Class DefaultHandlerExceptionResolver

  • All Implemented Interfaces:
    Ordered, HandlerExceptionResolver

    public class DefaultHandlerExceptionResolver
    extends AbstractHandlerExceptionResolver
    The default implementation of the HandlerExceptionResolver interface, resolving standard Spring MVC exceptions and translating them to corresponding HTTP status codes.

    This exception resolver is enabled by default in the common Spring DispatcherServlet.

    Supported Exceptions
    ExceptionHTTP Status Code

    HttpRequestMethodNotSupportedException

    405 (SC_METHOD_NOT_ALLOWED)

    HttpMediaTypeNotSupportedException

    415 (SC_UNSUPPORTED_MEDIA_TYPE)

    HttpMediaTypeNotAcceptableException

    406 (SC_NOT_ACCEPTABLE)

    MissingPathVariableException

    500 (SC_INTERNAL_SERVER_ERROR)

    MissingServletRequestParameterException

    400 (SC_BAD_REQUEST)

    ServletRequestBindingException

    400 (SC_BAD_REQUEST)

    ConversionNotSupportedException

    500 (SC_INTERNAL_SERVER_ERROR)

    TypeMismatchException

    400 (SC_BAD_REQUEST)

    HttpMessageNotReadableException

    400 (SC_BAD_REQUEST)

    HttpMessageNotWritableException

    500 (SC_INTERNAL_SERVER_ERROR)

    MethodArgumentNotValidException

    400 (SC_BAD_REQUEST)

    MissingServletRequestPartException

    400 (SC_BAD_REQUEST)

    BindException

    400 (SC_BAD_REQUEST)

    NoHandlerFoundException

    404 (SC_NOT_FOUND)

    AsyncRequestTimeoutException

    503 (SC_SERVICE_UNAVAILABLE)

    Since:
    3.0
    Author:
    Arjen Poutsma, Rossen Stoyanchev, Juergen Hoeller
    See Also:
    ResponseEntityExceptionHandler