ResponseEntityExceptionHandler rethrows unknown exception (for further processing in DispatcherServlet's HandlerExceptionResolver chain)

Issue: SPR-16743
This commit is contained in:
Juergen Hoeller
2018-05-05 12:46:58 +02:00
parent fb898e1727
commit 7b894fe73b
6 changed files with 184 additions and 102 deletions

View File

@@ -2448,8 +2448,8 @@ in `@ControllerAdvice` classes to apply them globally.
====
Note that Spring WebFlux does not have an equivalent for the Spring MVC
`ResponseEntityExceptionHandler` because WebFlux only raises `ResponseStatusException`
(or sub-classes of), which and those do not need to be translated translation to an HTTP
status code.
(or subclasses thereof), which and those do not need to be translated translation to
an HTTP status code.
====

View File

@@ -2977,7 +2977,7 @@ Applications that implement global exception handling with error details in the
body should consider extending
{api-spring-framework}/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.html[ResponseEntityExceptionHandler]
which provides handling for exceptions that Spring MVC raises along with hooks to
customize the response body. To make use of this, create a sub-class of
customize the response body. To make use of this, create a subclass of
`ResponseEntityExceptionHandler`, annotate with `@ControllerAdvice`, override the
necessary methods, and declare it as a Spring bean.