Browse Source

更新拦截器

master
汪菘 2 years ago
parent
commit
68b2d8f594
  1. 6
      acs/nladmin-system/src/main/java/org/nl/modules/security/satoken/SaTokenConfigure.java

6
acs/nladmin-system/src/main/java/org/nl/modules/security/satoken/SaTokenConfigure.java

@ -34,9 +34,9 @@ public class SaTokenConfigure implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
// 注册 Sa-Token 拦截器,打开注解式鉴权功能
// registry.addInterceptor(new SaInterceptor(handle -> StpUtil.checkLogin()))
// .addPathPatterns("/**")
// .excludePathPatterns(securityProperties.getExcludes()); // 白名单
registry.addInterceptor(new SaInterceptor(handle -> StpUtil.checkLogin()))
.addPathPatterns("/**")
.excludePathPatterns(securityProperties.getExcludes()); // 白名单
}
}

Loading…
Cancel
Save