|
@@ -1,7 +1,6 @@
|
|
|
package com.ruoyi.framework.config;
|
|
|
|
|
|
-import cn.dev33.satoken.interceptor.SaAnnotationInterceptor;
|
|
|
-import cn.dev33.satoken.interceptor.SaRouteInterceptor;
|
|
|
+import cn.dev33.satoken.interceptor.SaInterceptor;
|
|
|
import cn.dev33.satoken.jwt.StpLogicJwtForSimple;
|
|
|
import cn.dev33.satoken.router.SaRouter;
|
|
|
import cn.dev33.satoken.stp.StpLogic;
|
|
@@ -34,7 +33,7 @@ public class SaTokenConfig implements WebMvcConfigurer {
|
|
|
@Override
|
|
|
public void addInterceptors(InterceptorRegistry registry) {
|
|
|
// 注册路由拦截器,自定义验证规则
|
|
|
- registry.addInterceptor(new SaRouteInterceptor((request, response, handler) -> {
|
|
|
+ registry.addInterceptor(new SaInterceptor(handler -> {
|
|
|
ExcludeUrlProperties excludeUrlProperties = SpringUtils.getBean(ExcludeUrlProperties.class);
|
|
|
// 登录验证 -- 排除多个路径
|
|
|
SaRouter
|
|
@@ -56,7 +55,6 @@ public class SaTokenConfig implements WebMvcConfigurer {
|
|
|
|
|
|
});
|
|
|
})).addPathPatterns("/**");
|
|
|
- registry.addInterceptor(new SaAnnotationInterceptor()).addPathPatterns("/**");
|
|
|
}
|
|
|
|
|
|
@Bean
|