Class RestApiExceptionMapperForWebAutoConfiguration

java.lang.Object
org.bremersee.exception.spring.boot.autoconfigure.servlet.RestApiExceptionMapperForWebAutoConfiguration

@ConditionalOnWebApplication(type=SERVLET) @ConditionalOnClass(name={"com.fasterxml.jackson.databind.ObjectMapper","org.bremersee.exception.RestApiExceptionMapperProperties"}) @AutoConfiguration @EnableConfigurationProperties(RestApiExceptionMapperBootProperties.class) public class RestApiExceptionMapperForWebAutoConfiguration extends Object
The rest api exception mapper autoconfiguration.
Author:
Christian Bremer
  • Constructor Details

    • RestApiExceptionMapperForWebAutoConfiguration

      public RestApiExceptionMapperForWebAutoConfiguration(@Value("${spring.application.name:application}") String applicationName, RestApiExceptionMapperBootProperties properties)
      Instantiates a new rest api exception mapper autoconfiguration.
      Parameters:
      applicationName - the application name
      properties - the properties
  • Method Details

    • init

      @EventListener(org.springframework.boot.context.event.ApplicationReadyEvent.class) public void init()
      Init.
    • restApiExceptionMapper

      @ConditionalOnMissingBean @Bean public RestApiExceptionMapper restApiExceptionMapper()
      Builds the rest api exception mapper bean.
      Returns:
      the rest api exception mapper bean