Class ErrorMvcAutoConfiguration

java.lang.Object
org.springframework.boot.webmvc.autoconfigure.error.ErrorMvcAutoConfiguration

@AutoConfiguration(before=WebMvcAutoConfiguration.class) @ConditionalOnWebApplication(type=SERVLET) @ConditionalOnClass({jakarta.servlet.Servlet.class,org.springframework.web.servlet.DispatcherServlet.class,org.springframework.boot.web.server.autoconfigure.ServerProperties.class}) @EnableConfigurationProperties({org.springframework.boot.web.server.autoconfigure.ServerProperties.class,WebMvcProperties.class}) public class ErrorMvcAutoConfiguration extends Object
Auto-configuration to render errors through an MVC error controller.
Since:
4.0.0
  • Constructor Details

    • ErrorMvcAutoConfiguration

      public ErrorMvcAutoConfiguration(org.springframework.boot.web.server.autoconfigure.ServerProperties serverProperties)
  • Method Details

    • errorAttributes

      @Bean @ConditionalOnMissingBean(value=ErrorAttributes.class, search=CURRENT) public DefaultErrorAttributes errorAttributes()
    • basicErrorController

      @Bean @ConditionalOnMissingBean(value=ErrorController.class, search=CURRENT) public BasicErrorController basicErrorController(ErrorAttributes errorAttributes, org.springframework.beans.factory.ObjectProvider<ErrorViewResolver> errorViewResolvers)
    • errorPageCustomizer

      @Bean public org.springframework.boot.webmvc.autoconfigure.error.ErrorMvcAutoConfiguration.ErrorPageCustomizer errorPageCustomizer(DispatcherServletPath dispatcherServletPath)
    • preserveErrorControllerTargetClassPostProcessor

      @Bean public static org.springframework.boot.webmvc.autoconfigure.error.ErrorMvcAutoConfiguration.PreserveErrorControllerTargetClassPostProcessor preserveErrorControllerTargetClassPostProcessor()