修复 接口文档被拦截的问题
This commit is contained in:
parent
177b126998
commit
85b96101b3
@ -19,9 +19,18 @@ public class SaTokenConfigure implements WebMvcConfigurer {
|
|||||||
// 注册 Sa-Token 拦截器,校验规则为 StpUtil.checkLogin() 登录校验。
|
// 注册 Sa-Token 拦截器,校验规则为 StpUtil.checkLogin() 登录校验。
|
||||||
registry.addInterceptor(new SaInterceptor(handle -> StpUtil.checkLogin()))
|
registry.addInterceptor(new SaInterceptor(handle -> StpUtil.checkLogin()))
|
||||||
.addPathPatterns("/**")
|
.addPathPatterns("/**")
|
||||||
.excludePathPatterns("/auth/**")
|
.excludePathPatterns(
|
||||||
.excludePathPatterns("/user/doLogin")
|
"/auth/**",
|
||||||
.excludePathPatterns("/doc.html")
|
"/user/doLogin"
|
||||||
.excludePathPatterns("/swagger-ui.html");
|
).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