修复 接口文档被拦截的问题
This commit is contained in:
parent
177b126998
commit
85b96101b3
@ -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/**"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user