Class ResponseEntityExceptionHandler

java.lang.Object
org.springframework.web.reactive.result.method.annotation.ResponseEntityExceptionHandler
All Implemented Interfaces:
Aware, MessageSourceAware

public abstract class ResponseEntityExceptionHandler extends Object implements MessageSourceAware
A class with an @ExceptionHandler method that handles all Spring WebFlux raised exceptions by returning a ResponseEntity with RFC 7807 formatted error details in the body.

Convenient as a base class of an @ControllerAdvice for global exception handling in an application. Subclasses can override individual methods that handle a specific exception, override handleExceptionInternal(java.lang.Exception, java.lang.Object, org.springframework.http.HttpHeaders, org.springframework.http.HttpStatusCode, org.springframework.web.server.ServerWebExchange) to override common handling of all exceptions, or override createResponseEntity(java.lang.Object, org.springframework.http.HttpHeaders, org.springframework.http.HttpStatusCode, org.springframework.web.server.ServerWebExchange) to intercept the final step of creating the ResponseEntity from the selected HTTP status code, headers, and body.

Since:
6.0
Author:
Rossen Stoyanchev