Class AbstractErrorController
- java.lang.Object
- org.springframework.boot.autoconfigure.web.AbstractErrorController
- All Implemented Interfaces:
ErrorController
- Direct Known Subclasses:
BasicErrorController
public abstract class AbstractErrorController extends Object implements ErrorController
Abstract base class for errorController
implementations.- Since:
- 1.3.0
- See Also:
ErrorAttributes
Constructor Summary
Constructors Constructor Description AbstractErrorController(ErrorAttributes errorAttributes)
AbstractErrorController(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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.boot.autoconfigure.web.ErrorController
getErrorPath
Constructor Detail
AbstractErrorController
public AbstractErrorController(ErrorAttributes errorAttributes)
AbstractErrorController
public AbstractErrorController(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