Class DefaultHandlerExceptionResolver

java.lang.Object
org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver
org.springframework.web.servlet.mvc.support.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

Exception HTTP 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)
MissingServletRequestPartException
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)
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: