@Controller public class BasicErrorController extends Object implements ErrorController
Controller, rendering servlet container error codes and
messages where available. More specific errors can be handled either using Spring MVC
abstractions (e.g. @ExceptionHandler) or by adding servlet
container
error pages.| Constructor and Description |
|---|
BasicErrorController() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<Map<String,Object>> |
error(javax.servlet.http.HttpServletRequest request) |
org.springframework.web.servlet.ModelAndView |
errorHtml(javax.servlet.http.HttpServletRequest request) |
Map<String,Object> |
extract(org.springframework.web.context.request.RequestAttributes attributes,
boolean trace,
boolean log)
Extract a useful model of the error from the request attributes.
|
String |
getErrorPath()
Returns the path of the error page.
|
public String getErrorPath()
ErrorControllergetErrorPath in interface ErrorController@RequestMapping(value="${error.path:/error}",
produces="text/html")
public org.springframework.web.servlet.ModelAndView errorHtml(javax.servlet.http.HttpServletRequest request)
@RequestMapping(value="${error.path:/error}")
@ResponseBody
public org.springframework.http.ResponseEntity<Map<String,Object>> error(javax.servlet.http.HttpServletRequest request)
public Map<String,Object> extract(org.springframework.web.context.request.RequestAttributes attributes, boolean trace, boolean log)
ErrorControllerextract in interface ErrorControllerattributes - the request attributestrace - flag to indicate that stack trace information should be includedlog - flag to indicate that an error should be loggedCopyright © 2014 Pivotal Software, Inc.. All rights reserved.