feat: jwt interceptor exclude swagger path

main
itao 12 months ago
parent ef69f01004
commit f39761d4b5

@ -17,8 +17,10 @@ public class WebMvcConfig extends WebMvcConfigurationSupport {
* @param registry * @param registry
*/ */
protected void addInterceptors(InterceptorRegistry registry) { protected void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(jwtInterceptor). String[] excludePaths = {"/doc.html/**","/swagger-resources/**","/webjars/**","/v2/**"};
addPathPatterns("/**"); registry.addInterceptor(jwtInterceptor)
.excludePathPatterns(excludePaths)
.addPathPatterns("/**");
} }
@Override @Override
protected void addResourceHandlers(ResourceHandlerRegistry registry) { protected void addResourceHandlers(ResourceHandlerRegistry registry) {

Loading…
Cancel
Save