@Controller @RequestMapping(value="${error.path:/error}") public class BasicErrorController extends Object implements ErrorController
Controller, rendering ErrorAttributes. More specific
errors can be handled either using Spring MVC abstractions (e.g.
@ExceptionHandler) or by adding servlet
container error pages.ErrorAttributes| Constructor and Description |
|---|
BasicErrorController(ErrorAttributes errorAttributes) |
| Modifier and Type | Method and Description |
|---|---|
ResponseEntity<Map<String,Object>> |
error(HttpServletRequest request) |
ModelAndView |
errorHtml(HttpServletRequest request) |
protected Map<String,Object> |
getErrorAttributes(HttpServletRequest request) |
protected Map<String,Object> |
getErrorAttributes(HttpServletRequest request,
boolean includeStackTrace) |
String |
getErrorPath()
Returns the path of the error page.
|
protected HttpStatus |
getStatus(HttpServletRequest request) |
public BasicErrorController(ErrorAttributes errorAttributes)
public String getErrorPath()
ErrorControllergetErrorPath in interface ErrorController@RequestMapping(produces="text/html") public ModelAndView errorHtml(HttpServletRequest request)
@RequestMapping @ResponseBody public ResponseEntity<Map<String,Object>> error(HttpServletRequest request)
protected Map<String,Object> getErrorAttributes(HttpServletRequest request)
protected Map<String,Object> getErrorAttributes(HttpServletRequest request, boolean includeStackTrace)
protected HttpStatus getStatus(HttpServletRequest request)
Copyright © 2015 Pivotal Software, Inc.. All rights reserved.