Package org.bremersee.web.servlet
Class ApiExceptionResolverAutoConfiguration
- java.lang.Object
-
- org.bremersee.web.servlet.ApiExceptionResolverAutoConfiguration
-
- All Implemented Interfaces:
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
@ConditionalOnWebApplication(type=SERVLET) @ConditionalOnClass(org.bremersee.web.servlet.ApiExceptionResolver.class) @ConditionalOnBean({org.bremersee.exception.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<org.bremersee.exception.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 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 Detail
-
ApiExceptionResolverAutoConfiguration
public ApiExceptionResolverAutoConfiguration(org.springframework.beans.factory.ObjectProvider<org.bremersee.exception.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 mapperobjectMapperBuilder
- 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 interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
-