@Configuration(proxyBeanMethods=false) @ConditionalOnWebApplication(type=SERVLET) @ConditionalOnClass(value={javax.servlet.Servlet.class,org.springframework.web.servlet.DispatcherServlet.class}) @AutoConfigureBefore(value=WebMvcAutoConfiguration.class) @EnableConfigurationProperties(value={ServerProperties.class,WebMvcProperties.class}) public class ErrorMvcAutoConfiguration extends java.lang.Object
Auto-configuration
to render errors via an MVC error
controller.Modifier and Type | Class and Description |
---|---|
protected static class |
ErrorMvcAutoConfiguration.WhitelabelErrorViewConfiguration |
Constructor and Description |
---|
ErrorMvcAutoConfiguration(ServerProperties serverProperties) |
Modifier and Type | Method and Description |
---|---|
BasicErrorController |
basicErrorController(org.springframework.boot.web.servlet.error.ErrorAttributes errorAttributes,
org.springframework.beans.factory.ObjectProvider<ErrorViewResolver> errorViewResolvers) |
org.springframework.boot.web.servlet.error.DefaultErrorAttributes |
errorAttributes() |
org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration.ErrorPageCustomizer |
errorPageCustomizer(DispatcherServletPath dispatcherServletPath) |
static org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration.PreserveErrorControllerTargetClassPostProcessor |
preserveErrorControllerTargetClassPostProcessor() |
public ErrorMvcAutoConfiguration(ServerProperties serverProperties)
@Bean @ConditionalOnMissingBean(value=org.springframework.boot.web.servlet.error.ErrorAttributes.class, search=CURRENT) public org.springframework.boot.web.servlet.error.DefaultErrorAttributes errorAttributes()
@Bean @ConditionalOnMissingBean(value=org.springframework.boot.web.servlet.error.ErrorController.class, search=CURRENT) public BasicErrorController basicErrorController(org.springframework.boot.web.servlet.error.ErrorAttributes errorAttributes, org.springframework.beans.factory.ObjectProvider<ErrorViewResolver> errorViewResolvers)
@Bean public org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration.ErrorPageCustomizer errorPageCustomizer(DispatcherServletPath dispatcherServletPath)
@Bean public static org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration.PreserveErrorControllerTargetClassPostProcessor preserveErrorControllerTargetClassPostProcessor()