Class ApiExceptionHandlerAutoConfiguration

java.lang.Object
org.bremersee.exception.spring.boot.autoconfigure.reactive.ApiExceptionHandlerAutoConfiguration

@ConditionalOnWebApplication(type=REACTIVE) @ConditionalOnClass(name={"com.fasterxml.jackson.databind.ObjectMapper","org.bremersee.exception.RestApiExceptionMapper"}) @ConditionalOnBean({org.springframework.boot.web.reactive.error.ErrorAttributes.class,org.springframework.boot.autoconfigure.web.WebProperties.class,org.springframework.http.codec.ServerCodecConfigurer.class}) @AutoConfigureAfter(RestApiExceptionMapperForWebFluxAutoConfiguration.class) @AutoConfiguration @EnableConfigurationProperties(RestApiExceptionMapperBootProperties.class) public class ApiExceptionHandlerAutoConfiguration extends Object
The api exception handler autoconfiguration.
Author:
Christian Bremer
  • Constructor Summary

    Constructors
    Constructor
    Description
    Instantiates a new api exception handler autoconfiguration.
  • Method Summary

    Modifier and Type
    Method
    Description
    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> webProperties, org.springframework.context.ApplicationContext applicationContext, org.springframework.beans.factory.ObjectProvider<org.springframework.http.codec.ServerCodecConfigurer> serverCodecConfigurer, org.springframework.beans.factory.ObjectProvider<RestApiExceptionMapper> restApiExceptionMapper)
    Builds api exception handler bean.
    void
    Init.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ApiExceptionHandlerAutoConfiguration

      public ApiExceptionHandlerAutoConfiguration(RestApiExceptionMapperBootProperties properties)
      Instantiates a new api exception handler autoconfiguration.
      Parameters:
      properties - the properties
  • Method Details

    • 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> webProperties, org.springframework.context.ApplicationContext applicationContext, org.springframework.beans.factory.ObjectProvider<org.springframework.http.codec.ServerCodecConfigurer> serverCodecConfigurer, org.springframework.beans.factory.ObjectProvider<RestApiExceptionMapper> restApiExceptionMapper)
      Builds api exception handler bean.
      Parameters:
      errorAttributes - the error attributes
      webProperties - the web properties
      applicationContext - the application context
      serverCodecConfigurer - the server codec configurer
      restApiExceptionMapper - the rest api exception mapper
      Returns:
      the api exception handler bean