Class AbstractErrorController
- java.lang.Object
- org.springframework.boot.autoconfigure.web.servlet.error.AbstractErrorController
- All Implemented Interfaces:
org.springframework.boot.web.servlet.error.ErrorController
- Direct Known Subclasses:
BasicErrorController
public abstract class AbstractErrorController extends Object implements org.springframework.boot.web.servlet.error.ErrorController
Abstract base class for errorController
implementations.- Since:
- 1.3.0
- See Also:
ErrorAttributes
Constructor Summary
Constructors Constructor Description AbstractErrorController(org.springframework.boot.web.servlet.error.ErrorAttributes errorAttributes)
AbstractErrorController(org.springframework.boot.web.servlet.error.ErrorAttributes errorAttributes, List<ErrorViewResolver> errorViewResolvers)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,Object>
getErrorAttributes(javax.servlet.http.HttpServletRequest request, boolean includeStackTrace)
protected org.springframework.http.HttpStatus
getStatus(javax.servlet.http.HttpServletRequest request)
protected boolean
getTraceParameter(javax.servlet.http.HttpServletRequest request)
protected org.springframework.web.servlet.ModelAndView
resolveErrorView(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.http.HttpStatus status, Map<String,Object> model)
Resolve any specific error views.
Constructor Detail
AbstractErrorController
public AbstractErrorController(org.springframework.boot.web.servlet.error.ErrorAttributes errorAttributes)
AbstractErrorController
public AbstractErrorController(org.springframework.boot.web.servlet.error.ErrorAttributes errorAttributes, List<ErrorViewResolver> errorViewResolvers)
Method Detail
getErrorAttributes
protected Map<String,Object> getErrorAttributes(javax.servlet.http.HttpServletRequest request, boolean includeStackTrace)
getTraceParameter
protected boolean getTraceParameter(javax.servlet.http.HttpServletRequest request)
getStatus
protected org.springframework.http.HttpStatus getStatus(javax.servlet.http.HttpServletRequest request)
resolveErrorView
protected org.springframework.web.servlet.ModelAndView resolveErrorView(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.http.HttpStatus status, Map<String,Object> model)
Resolve any specific error views. By default this method delegates toErrorViewResolvers
.- Parameters:
request
- the requestresponse
- the responsestatus
- the HTTP statusmodel
- the suggested model- Returns:
- a specific
ModelAndView
ornull
if the default should be used - Since:
- 1.4.0