Improve Javadoc for @ExceptionHandler

This commit adds `ProblemDetail` and `ErrorResponse` to the list of
supported return types for `@ExceptionHandler` methods.

Closes gh-34554

Signed-off-by: Vedran Pavic <vedran@vedranpavic.com>
This commit is contained in:
Vedran Pavic 2025-03-07 18:20:47 +01:00 committed by rstoyanchev
parent fa781c8390
commit 4d862b871d
1 changed files with 2 additions and 0 deletions

View File

@ -88,6 +88,8 @@ import org.springframework.core.annotation.AliasFor;
* (Servlet-only) to set response headers and content. The ResponseEntity body
* will be converted and written to the response stream using
* {@linkplain org.springframework.http.converter.HttpMessageConverter message converters}.
* <li>A {@link org.springframework.http.ProblemDetail} or {@link org.springframework.web.ErrorResponse}
* object to render an RFC 9457 error response with details in the body.
* <li>{@code void} if the method handles the response itself (by
* writing the response content directly, declaring an argument of type
* {@link jakarta.servlet.ServletResponse} / {@link jakarta.servlet.http.HttpServletResponse}