Class CustomErrorWebExceptionHandler
java.lang.Object
org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler
org.springframework.boot.autoconfigure.web.reactive.error.DefaultErrorWebExceptionHandler
es.kukenan.smartfi.microservice.webfluxconfig.configuration.error.CustomErrorWebExceptionHandler
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean,org.springframework.boot.web.reactive.error.ErrorWebExceptionHandler,org.springframework.web.server.WebExceptionHandler
public class CustomErrorWebExceptionHandler
extends org.springframework.boot.autoconfigure.web.reactive.error.DefaultErrorWebExceptionHandler
Exception handler.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ExceptionFormatterManagerException handler manager. -
Constructor Summary
ConstructorsConstructorDescriptionCustomErrorWebExceptionHandler(org.springframework.boot.web.reactive.error.ErrorAttributes errorAttributes, org.springframework.boot.autoconfigure.web.WebProperties resourceProperties, org.springframework.boot.autoconfigure.web.ErrorProperties errorProperties, org.springframework.context.ApplicationContext applicationContext, ExceptionFormatterManager exceptionFormatterManager) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprivate reactor.core.publisher.Mono<org.springframework.web.reactive.function.server.ServerResponse>generateErrorBody(org.springframework.web.reactive.function.server.ServerRequest request) org.springframework.web.reactive.function.server.RouterFunction<org.springframework.web.reactive.function.server.ServerResponse>getRoutingFunction(org.springframework.boot.web.reactive.error.ErrorAttributes errorAttributes) Methods inherited from class org.springframework.boot.autoconfigure.web.reactive.error.DefaultErrorWebExceptionHandler
acceptsTextHtml, getErrorAttributeOptions, getHttpStatus, isIncludeBindingErrors, isIncludeMessage, isIncludeStackTrace, renderErrorResponse, renderErrorViewMethods inherited from class org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler
afterPropertiesSet, getError, getErrorAttributes, getErrorAttributes, handle, isBindingErrorsEnabled, isMessageEnabled, isTraceEnabled, logError, renderDefaultErrorView, renderErrorView, setMessageReaders, setMessageWriters, setViewResolvers
-
Field Details
-
exceptionFormatterManager
Exception handler manager.
-
-
Constructor Details
-
CustomErrorWebExceptionHandler
public CustomErrorWebExceptionHandler(org.springframework.boot.web.reactive.error.ErrorAttributes errorAttributes, org.springframework.boot.autoconfigure.web.WebProperties resourceProperties, org.springframework.boot.autoconfigure.web.ErrorProperties errorProperties, org.springframework.context.ApplicationContext applicationContext, ExceptionFormatterManager exceptionFormatterManager) Constructor.- Parameters:
errorAttributes- Error attributesresourceProperties- Resource propertieserrorProperties- Error propertiesapplicationContext- Application contextexceptionFormatterManager- Exception handler manager
-
-
Method Details
-
getRoutingFunction
public org.springframework.web.reactive.function.server.RouterFunction<org.springframework.web.reactive.function.server.ServerResponse> getRoutingFunction(org.springframework.boot.web.reactive.error.ErrorAttributes errorAttributes) - Overrides:
getRoutingFunctionin classorg.springframework.boot.autoconfigure.web.reactive.error.DefaultErrorWebExceptionHandler
-
generateErrorBody
private reactor.core.publisher.Mono<org.springframework.web.reactive.function.server.ServerResponse> generateErrorBody(org.springframework.web.reactive.function.server.ServerRequest request)
-