diff --git a/src/main/java/com/guaiguailang/harmony/config/SaTokenConfigure.java b/src/main/java/com/guaiguailang/harmony/config/SaTokenConfigure.java index c12c275..c75ab5a 100644 --- a/src/main/java/com/guaiguailang/harmony/config/SaTokenConfigure.java +++ b/src/main/java/com/guaiguailang/harmony/config/SaTokenConfigure.java @@ -19,9 +19,18 @@ public class SaTokenConfigure implements WebMvcConfigurer { // 注册 Sa-Token 拦截器,校验规则为 StpUtil.checkLogin() 登录校验。 registry.addInterceptor(new SaInterceptor(handle -> StpUtil.checkLogin())) .addPathPatterns("/**") - .excludePathPatterns("/auth/**") - .excludePathPatterns("/user/doLogin") - .excludePathPatterns("/doc.html") - .excludePathPatterns("/swagger-ui.html"); + .excludePathPatterns( + "/auth/**", + "/user/doLogin" + ).excludePathPatterns( + "/doc.html", + "/doc.html/**", + "/swagger/**", + "/swagger-resources", + "/swagger-ui.html", + "/swagger-ui.html/**", + "/webjars/**", + "/v3/api-docs/**" + ); } }