@Configuration
open class MyWebMvcConfig : WebMvcConfigurationSupport() {
    override fun addResourceHandlers( registry: ResourceHandlerRegistry) {
        registry.addResourceHandler("/**").addResourceLocations("classpath:/static/");
        registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");
        registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
        super.addResourceHandlers(registry);
    }
}

不显示 basic-error-controller

https://blog.csdn.net/m0_37948170/article/details/80834718

 .paths(Predicates.not(PathSelectors.regex("/error.*")))

相关文章:

  • 2021-05-27
  • 2021-06-04
  • 2022-01-13
  • 2021-09-12
  • 2021-05-08
  • 2021-07-15
猜你喜欢
  • 2021-08-01
  • 2021-10-30
  • 2022-12-23
  • 2021-09-06
相关资源
相似解决方案