Class ApiExceptionResolverAutoConfiguration

java.lang.Object
org.bremersee.exception.spring.boot.autoconfigure.servlet.ApiExceptionResolverAutoConfiguration
All Implemented Interfaces:
org.springframework.web.servlet.config.annotation.WebMvcConfigurer

@ConditionalOnWebApplication(type=SERVLET) @ConditionalOnClass(name={"com.fasterxml.jackson.databind.ObjectMapper","org.bremersee.exception.RestApiExceptionMapperProperties","org.bremersee.exception.servlet.ApiExceptionResolver"}) @ConditionalOnBean(org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.class) @AutoConfigureAfter(RestApiExceptionMapperForWebAutoConfiguration.class) @AutoConfiguration @EnableConfigurationProperties(RestApiExceptionMapperBootProperties.class) public class ApiExceptionResolverAutoConfiguration extends Object implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
The api exception resolver autoconfiguration.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ApiExceptionResolverAutoConfiguration(RestApiExceptionMapperBootProperties properties, org.springframework.beans.factory.ObjectProvider<RestApiExceptionMapper> apiExceptionMapper, org.springframework.beans.factory.ObjectProvider<org.springframework.http.converter.json.Jackson2ObjectMapperBuilder> objectMapperBuilder, org.springframework.beans.factory.ObjectProvider<HttpServletRequestIdProvider> restApiIdProvider)
    Instantiates a new api exception resolver autoconfiguration.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    extendHandlerExceptionResolvers(List<org.springframework.web.servlet.HandlerExceptionResolver> exceptionResolvers)
     
    void
    Init.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer

    addArgumentResolvers, addCorsMappings, addFormatters, addInterceptors, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
  • Constructor Details

    • ApiExceptionResolverAutoConfiguration

      public ApiExceptionResolverAutoConfiguration(RestApiExceptionMapperBootProperties properties, org.springframework.beans.factory.ObjectProvider<RestApiExceptionMapper> apiExceptionMapper, org.springframework.beans.factory.ObjectProvider<org.springframework.http.converter.json.Jackson2ObjectMapperBuilder> objectMapperBuilder, org.springframework.beans.factory.ObjectProvider<HttpServletRequestIdProvider> restApiIdProvider)
      Instantiates a new api exception resolver autoconfiguration.
      Parameters:
      properties - the properties
      apiExceptionMapper - the api exception mapper
      objectMapperBuilder - the object mapper builder
      restApiIdProvider - the rest api id provider
  • Method Details

    • init

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

      public void extendHandlerExceptionResolvers(List<org.springframework.web.servlet.HandlerExceptionResolver> exceptionResolvers)
      Specified by:
      extendHandlerExceptionResolvers in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer