|
|
@@ -1,5 +1,6 @@
|
|
|
package com.nb.auth.sa;
|
|
|
|
|
|
+import cn.dev33.satoken.interceptor.SaAnnotationInterceptor;
|
|
|
import cn.dev33.satoken.interceptor.SaRouteInterceptor;
|
|
|
import cn.dev33.satoken.router.SaRouter;
|
|
|
import cn.dev33.satoken.stp.StpUtil;
|
|
|
@@ -9,6 +10,7 @@ import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.core.annotation.Order;
|
|
|
import org.springframework.web.servlet.HandlerInterceptor;
|
|
|
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
@@ -21,7 +23,6 @@ import java.util.List;
|
|
|
@Slf4j
|
|
|
@Configuration
|
|
|
public class SaTokenConfig {
|
|
|
-
|
|
|
@Bean
|
|
|
@Order(1)
|
|
|
public HandlerInterceptor handlerInterceptor(){
|
|
|
@@ -32,6 +33,12 @@ public class SaTokenConfig {
|
|
|
// .check(StpUtil::checkLogin);
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ @Bean
|
|
|
+ @Order(1)
|
|
|
+ public HandlerInterceptor annotationInterceptor(){
|
|
|
+ return new SaAnnotationInterceptor();
|
|
|
+ }
|
|
|
private static final List<String> IGNORE_URL = new ArrayList<>();
|
|
|
|
|
|
static {
|