Class AbstractErrorController

java.lang.Object
org.springframework.boot.autoconfigure.web.servlet.error.AbstractErrorController
All Implemented Interfaces:
ErrorController
Direct Known Subclasses:
BasicErrorController

public abstract class AbstractErrorController extends Object implements ErrorController
Abstract base class for error @Controller implementations.
Since:
1.3.0
Author:
Dave Syer, Phillip Webb, Scott Frederick, Moritz Halbritter
See Also:
  • Constructor Details

  • Method Details

    • getErrorAttributes

      protected Map<String,Object> getErrorAttributes(HttpServletRequest request, ErrorAttributeOptions options)
    • getTraceParameter

      protected boolean getTraceParameter(HttpServletRequest request)
      Returns whether the trace parameter is set.
      Parameters:
      request - the request
      Returns:
      whether the trace parameter is set
    • getMessageParameter

      protected boolean getMessageParameter(HttpServletRequest request)
      Returns whether the message parameter is set.
      Parameters:
      request - the request
      Returns:
      whether the message parameter is set
    • getErrorsParameter

      protected boolean getErrorsParameter(HttpServletRequest request)
      Returns whether the errors parameter is set.
      Parameters:
      request - the request
      Returns:
      whether the errors parameter is set
    • getPathParameter

      protected boolean getPathParameter(HttpServletRequest request)
      Returns whether the path parameter is set.
      Parameters:
      request - the request
      Returns:
      whether the path parameter is set
      Since:
      3.3.0
    • getBooleanParameter

      protected boolean getBooleanParameter(HttpServletRequest request, String parameterName)
    • getStatus

      protected HttpStatus getStatus(HttpServletRequest request)
    • resolveErrorView

      protected ModelAndView resolveErrorView(HttpServletRequest request, HttpServletResponse response, HttpStatus status, Map<String,Object> model)
      Resolve any specific error views. By default this method delegates to ErrorViewResolvers.
      Parameters:
      request - the request
      response - the response
      status - the HTTP status
      model - the suggested model
      Returns:
      a specific ModelAndView or null if the default should be used
      Since:
      1.4.0