Class RestApiExceptionParserForWebAutoConfiguration

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

@ConditionalOnWebApplication(type=SERVLET) @ConditionalOnClass(name={"com.fasterxml.jackson.databind.ObjectMapper","org.springframework.http.converter.json.Jackson2ObjectMapperBuilder","org.bremersee.exception.RestApiExceptionParserImpl"}) @AutoConfiguration public class RestApiExceptionParserForWebAutoConfiguration extends Object
The rest api exception parser autoconfiguration.
Author:
Christian Bremer
  • Constructor Details

    • RestApiExceptionParserForWebAutoConfiguration

      public RestApiExceptionParserForWebAutoConfiguration()
  • Method Details

    • init

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

      @ConditionalOnMissingBean @Bean public RestApiExceptionParser restApiExceptionParser(org.springframework.core.env.Environment environment, org.springframework.beans.factory.ObjectProvider<org.springframework.http.converter.json.Jackson2ObjectMapperBuilder> objectMapperBuilderProvider)
      Creates rest api exception parser for servlet based web application.
      Parameters:
      environment - the environment
      objectMapperBuilderProvider - the object mapper builder provider
      Returns:
      the rest api exception parser