放行 , 不拦截.
@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.****.net/m0_37948170/article/details/80834718
.paths(Predicates.not(PathSelectors.regex("/error.*")))