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
*/
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) {

Loading…
Cancel
Save