diff --git a/spring-framework-reference/src/mvc.xml b/spring-framework-reference/src/mvc.xml index e28553c017..45ed5e6b76 100644 --- a/spring-framework-reference/src/mvc.xml +++ b/spring-framework-reference/src/mvc.xml @@ -2679,7 +2679,7 @@ public class FileUpoadController {
<interfacename>HandlerExceptionResolver<!--I thought HandlerExceptionResolver needed its own section.--></interfacename> + id="mvc-HandlerExceptionResolver">HandlerExceptionResolver Spring HandlerExceptionResolvers ease the pain of unexpected exceptions that occur while your request is handled by a @@ -2705,6 +2705,60 @@ public class FileUpoadController { exception mapping feature from the Servlet API, but it is also possible to implement more finely grained mappings of exceptions from different handlers. + + By default, the DispatcherServlet registers + the DefaultHandlerExceptionResolver. This resolver + handles certain standard Spring MVC exceptions by setting a specific + response status code: + + + + + Exception + HTTP Status Code + + + + + ConversionNotSupportedException + 500 (Internal Server Error) + + + HttpMediaTypeNotAcceptableException + 406 (Not Acceptable) + + + HttpMediaTypeNotSupportedException + 415 (Unsupported Media Type) + + + HttpMessageNotReadableException + 400 (Bad Request) + + + HttpMessageNotWritableException + 500 (Internal Server Error) + + + HttpRequestMethodNotSupportedException + 405 (Method Not Allowed) + + + MissingServletRequestParameterException + 400 (Bad Request) + + + NoSuchRequestHandlingMethodException + 404 (Not Found) + + + TypeMismatchException + 400 (Bad Request) + + + + +