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