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
ConstructorDescriptionApiExceptionResolverAutoConfiguration
(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 TypeMethodDescriptionvoid
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 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 propertiesapiExceptionMapper
- the api exception mapperobjectMapperBuilder
- the object mapper builderrestApiIdProvider
- 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 interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-