临时放开全局登录认证,方便前端对接
This commit is contained in:
parent
08d48aac2b
commit
716e764689
|
@ -38,16 +38,16 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
||||||
registry.addResourceHandler("/static/image/temp/**").addResourceLocations("file:" + uploadTempPath);
|
registry.addResourceHandler("/static/image/temp/**").addResourceLocations("file:" + uploadTempPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
// @Override
|
||||||
public void addInterceptors(InterceptorRegistry registry) {
|
// public void addInterceptors(InterceptorRegistry registry) {
|
||||||
// 注册 Sa-Token 拦截器,定义详细认证规则
|
// // 注册 Sa-Token 拦截器,定义详细认证规则
|
||||||
registry.addInterceptor(new SaInterceptor(handler -> {
|
// registry.addInterceptor(new SaInterceptor(handler -> {
|
||||||
SaRouter
|
// SaRouter
|
||||||
.match("/**") // 拦截的 path 列表,可以写多个 */
|
// .match("/**") // 拦截的 path 列表,可以写多个 */
|
||||||
.notMatch(excludePaths())
|
// .notMatch(excludePaths())
|
||||||
.check(r -> StpUtil.checkLogin());
|
// .check(r -> StpUtil.checkLogin());
|
||||||
})).addPathPatterns("/**");
|
// })).addPathPatterns("/**");
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 动态获取哪些 path 可以忽略鉴权
|
// 动态获取哪些 path 可以忽略鉴权
|
||||||
public List<String> excludePaths() {
|
public List<String> excludePaths() {
|
||||||
|
|
Loading…
Reference in New Issue