diff --git a/luoo_tag/src/main/java/com/luoo/tag/config/WebMvcConfig.java b/luoo_tag/src/main/java/com/luoo/tag/config/WebMvcConfig.java index dbfe048..7f340f5 100644 --- a/luoo_tag/src/main/java/com/luoo/tag/config/WebMvcConfig.java +++ b/luoo_tag/src/main/java/com/luoo/tag/config/WebMvcConfig.java @@ -17,8 +17,10 @@ public class WebMvcConfig extends WebMvcConfigurationSupport { * @param registry */ protected void addInterceptors(InterceptorRegistry registry) { - registry.addInterceptor(jwtInterceptor). - addPathPatterns("/**"); + String[] excludePaths = {"/doc.html/**","/swagger-resources/**","/webjars/**","/v2/**"}; + registry.addInterceptor(jwtInterceptor) + .excludePathPatterns(excludePaths) + .addPathPatterns("/**"); } @Override protected void addResourceHandlers(ResourceHandlerRegistry registry) {