Package org.bremersee.web.reactive
Class ApiExceptionHandlerAutoConfiguration
- java.lang.Object
-
- org.bremersee.web.reactive.ApiExceptionHandlerAutoConfiguration
-
@ConditionalOnWebApplication(type=REACTIVE) @ConditionalOnBean({org.springframework.boot.web.reactive.error.ErrorAttributes.class,org.springframework.boot.autoconfigure.web.WebProperties.Resources.class,org.springframework.http.codec.ServerCodecConfigurer.class,org.bremersee.exception.RestApiExceptionMapper.class}) @AutoConfigureAfter(RestApiExceptionMapperAutoConfiguration.class) @Configuration public class ApiExceptionHandlerAutoConfiguration extends Object
The api exception handler auto configuration.- Author:
- Christian Bremer
-
-
Constructor Summary
Constructors Constructor Description ApiExceptionHandlerAutoConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApiExceptionHandler
apiExceptionHandler(org.springframework.beans.factory.ObjectProvider<org.springframework.boot.web.reactive.error.ErrorAttributes> errorAttributes, org.springframework.beans.factory.ObjectProvider<org.springframework.boot.autoconfigure.web.WebProperties.Resources> resources, org.springframework.context.ApplicationContext applicationContext, org.springframework.beans.factory.ObjectProvider<org.springframework.http.codec.ServerCodecConfigurer> serverCodecConfigurer, org.springframework.beans.factory.ObjectProvider<org.bremersee.exception.RestApiExceptionMapper> restApiExceptionMapper)
Builds api exception handler bean.void
init()
Init.
-
-
-
Method Detail
-
init
@EventListener(org.springframework.boot.context.event.ApplicationReadyEvent.class) public void init()
Init.
-
apiExceptionHandler
@Bean @Order(-2) public ApiExceptionHandler apiExceptionHandler(org.springframework.beans.factory.ObjectProvider<org.springframework.boot.web.reactive.error.ErrorAttributes> errorAttributes, org.springframework.beans.factory.ObjectProvider<org.springframework.boot.autoconfigure.web.WebProperties.Resources> resources, org.springframework.context.ApplicationContext applicationContext, org.springframework.beans.factory.ObjectProvider<org.springframework.http.codec.ServerCodecConfigurer> serverCodecConfigurer, org.springframework.beans.factory.ObjectProvider<org.bremersee.exception.RestApiExceptionMapper> restApiExceptionMapper)
Builds api exception handler bean.- Parameters:
errorAttributes
- the error attributesresources
- the resourcesapplicationContext
- the application contextserverCodecConfigurer
- the server codec configurerrestApiExceptionMapper
- the rest api exception mapper- Returns:
- the api exception handler bean
-
-