Class ApiExceptionResolverAutoConfiguration

  • All Implemented Interfaces:
    org.springframework.web.servlet.config.annotation.WebMvcConfigurer

    @ConditionalOnWebApplication(type=SERVLET)
    @ConditionalOnClass(ApiExceptionResolver.class)
    @ConditionalOnBean({RestApiExceptionMapper.class,org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.class})
    @AutoConfigureAfter(RestApiExceptionMapperAutoConfiguration.class)
    @Configuration
    public class ApiExceptionResolverAutoConfiguration
    extends Object
    implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
    The api exception resolver auto configuration.
    • Constructor Summary

      Constructors 
      Constructor Description
      ApiExceptionResolverAutoConfiguration​(org.springframework.beans.factory.ObjectProvider<RestApiExceptionMapper> apiExceptionMapper, org.springframework.beans.factory.ObjectProvider<org.springframework.http.converter.json.Jackson2ObjectMapperBuilder> objectMapperBuilder)
      Instantiates a new api exception resolver auto configuration.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void extendHandlerExceptionResolvers​(List<org.springframework.web.servlet.HandlerExceptionResolver> exceptionResolvers)  
      void init()
      Init.
      • 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 Detail

      • ApiExceptionResolverAutoConfiguration

        public ApiExceptionResolverAutoConfiguration​(org.springframework.beans.factory.ObjectProvider<RestApiExceptionMapper> apiExceptionMapper,
                                                     org.springframework.beans.factory.ObjectProvider<org.springframework.http.converter.json.Jackson2ObjectMapperBuilder> objectMapperBuilder)
        Instantiates a new api exception resolver auto configuration.
        Parameters:
        apiExceptionMapper - the api exception mapper
        objectMapperBuilder - the object mapper builder
    • Method Detail

      • 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