【更新】SaToken注解拦截器更新替换过时的写法

pull/87/head
xuyuxiang 2 years ago
parent 0c1e0952f1
commit 700232952f

@ -13,6 +13,7 @@
package vip.xiaonuo.auth.core.config;
import cn.dev33.satoken.interceptor.SaAnnotationInterceptor;
import cn.dev33.satoken.interceptor.SaInterceptor;
import cn.dev33.satoken.stp.StpInterface;
import cn.dev33.satoken.stp.StpLogic;
import cn.dev33.satoken.strategy.SaStrategy;
@ -66,7 +67,7 @@ public class AuthConfigure implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
// 注册注解拦截器,并排除不需要注解鉴权的接口地址 (与登录拦截器无关,只是说明哪些接口不需要被拦截器拦截,此处都拦截)
registry.addInterceptor(new SaAnnotationInterceptor()).addPathPatterns("/**");
registry.addInterceptor(new SaInterceptor()).addPathPatterns("/**");
}
@Bean("stpLogic")

Loading…
Cancel
Save