Class ExceptionHandlingwebHandler
java.lang.Object
org.springframework.web.server.handler.webHandlerDecorator
org.springframework.web.server.handler.ExceptionHandlingwebHandler
- All Implemented Interfaces:
webHandler
webHandler decorator that invokes one or more
webExceptionHandlers
after the delegate webHandler.- Since:
- 5.0
- Author:
- Rossen Stoyanchev
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of theattributethat contains the exception handled bywebExceptionHandlers. -
Constructor Summary
ConstructorsConstructorDescriptionExceptionHandlingwebHandler(webHandler delegate, List<webExceptionHandler> handlers) Create anExceptionHandlingwebHandlerfor the given delegate. -
Method Summary
Modifier and TypeMethodDescriptionReturn a read-only list of the configured exception handlers.reactor.core.publisher.Mono<Void> handle(ServerwebExchange exchange) Handle the web server exchange.Methods inherited from class webHandlerDecorator
getDelegate, toString
-
Field Details
-
HANDLED_web_EXCEPTION
Name of theattributethat contains the exception handled bywebExceptionHandlers.- Since:
- 6.1
-
-
Constructor Details
-
ExceptionHandlingwebHandler
Create anExceptionHandlingwebHandlerfor the given delegate.- Parameters:
delegate- the webHandler delegatehandlers- the webExceptionHandlers to apply
-
-
Method Details
-
getExceptionHandlers
Return a read-only list of the configured exception handlers. -
handle
Description copied from interface:webHandlerHandle the web server exchange.- Specified by:
handlein interfacewebHandler- Overrides:
handlein classwebHandlerDecorator- Parameters:
exchange- the current server exchange- Returns:
Mono<Void>to indicate when request handling is complete
-