Set throwExceptionIfNoHandlerFound=true and deprecate

Closes gh-29491
This commit is contained in:
rstoyanchev
2023-06-19 17:17:38 +01:00
parent c00508d6cf
commit 089d938e15
7 changed files with 23 additions and 12 deletions

View File

@@ -162,6 +162,10 @@ Spring MVC exceptions:
| (default)
|
| `NoResourceFoundException`
| (default)
|
| `TypeMismatchException`
| (default)
| `+{0}+` property name, `+{1}+` property value

View File

@@ -62,8 +62,7 @@ initialization parameters (`init-param` elements) to the Servlet declaration in
The exception can then be caught with a `HandlerExceptionResolver` (for example, by using an
`@ExceptionHandler` controller method) and handled as any others.
By default, this is set to `false`, in which case the `DispatcherServlet` sets the
response status to 404 (NOT_FOUND) without raising an exception.
As of 6.1, this property is set to `true` and deprecated.
Note that, if xref:web/webmvc/mvc-config/default-servlet-handler.adoc[default servlet handling] is
also configured, unresolved requests are always forwarded to the default servlet