类 CustomErrorConfig


  • @Configuration
    @ConditionalOnWebApplication(type=REACTIVE)
    @ConditionalOnClass(org.springframework.web.reactive.config.WebFluxConfigurer.class)
    @AutoConfigureBefore(org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration.class)
    @EnableConfigurationProperties({org.springframework.boot.autoconfigure.web.ServerProperties.class,org.springframework.boot.autoconfigure.web.WebProperties.class})
    public class CustomErrorConfig
    extends Object
    自定义异常配置
    作者:
    youta
    • 字段概要

      字段 
      修饰符和类型 字段 说明
      private org.springframework.boot.autoconfigure.web.ServerProperties serverProperties  
    • 构造器概要

      构造器 
      构造器 说明
      CustomErrorConfig​(org.springframework.boot.autoconfigure.web.ServerProperties serverProperties)  
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      org.springframework.boot.web.reactive.error.DefaultErrorAttributes errorAttributes()  
      org.springframework.boot.web.reactive.error.ErrorWebExceptionHandler errorWebExceptionHandler​(org.springframework.boot.web.reactive.error.ErrorAttributes errorAttributes, org.springframework.boot.autoconfigure.web.WebProperties webProperties, org.springframework.beans.factory.ObjectProvider<org.springframework.web.reactive.result.view.ViewResolver> viewResolvers, org.springframework.http.codec.ServerCodecConfigurer serverCodecConfigurer, org.springframework.context.ApplicationContext applicationContext)  
    • 字段详细资料

      • serverProperties

        private final org.springframework.boot.autoconfigure.web.ServerProperties serverProperties
    • 构造器详细资料

      • CustomErrorConfig

        public CustomErrorConfig​(org.springframework.boot.autoconfigure.web.ServerProperties serverProperties)
    • 方法详细资料

      • errorWebExceptionHandler

        @Bean
        @Order(-1)
        public org.springframework.boot.web.reactive.error.ErrorWebExceptionHandler errorWebExceptionHandler​(org.springframework.boot.web.reactive.error.ErrorAttributes errorAttributes,
                                                                                                             org.springframework.boot.autoconfigure.web.WebProperties webProperties,
                                                                                                             org.springframework.beans.factory.ObjectProvider<org.springframework.web.reactive.result.view.ViewResolver> viewResolvers,
                                                                                                             org.springframework.http.codec.ServerCodecConfigurer serverCodecConfigurer,
                                                                                                             org.springframework.context.ApplicationContext applicationContext)
      • errorAttributes

        @Bean
        @ConditionalOnMissingBean(value=org.springframework.boot.web.reactive.error.ErrorAttributes.class,
                                  search=CURRENT)
        public org.springframework.boot.web.reactive.error.DefaultErrorAttributes errorAttributes()