From 4ba4ea4fcc559a746daf44f276867e97e580019e Mon Sep 17 00:00:00 2001
From: AprilWind <2100166581@qq.com>
Date: 星期三, 15 一月 2025 16:56:09 +0800
Subject: [PATCH] update 升级warm-flow到1.6.0-m4
---
ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/config/SaTokenConfig.java | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/config/SaTokenConfig.java b/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/config/SaTokenConfig.java
index 54ae2da..61c6b9a 100644
--- a/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/config/SaTokenConfig.java
+++ b/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/config/SaTokenConfig.java
@@ -4,11 +4,13 @@
import cn.dev33.satoken.jwt.StpLogicJwtForSimple;
import cn.dev33.satoken.stp.StpInterface;
import cn.dev33.satoken.stp.StpLogic;
+import org.dromara.common.core.factory.YmlPropertySourceFactory;
import org.dromara.common.satoken.core.dao.PlusSaTokenDao;
import org.dromara.common.satoken.core.service.SaPermissionImpl;
+import org.dromara.common.satoken.handler.SaTokenExceptionHandler;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+import org.springframework.context.annotation.PropertySource;
/**
* sa-token 閰嶇疆
@@ -16,7 +18,8 @@
* @author Lion Li
*/
@AutoConfiguration
-public class SaTokenConfig implements WebMvcConfigurer {
+@PropertySource(value = "classpath:common-satoken.yml", factory = YmlPropertySourceFactory.class)
+public class SaTokenConfig {
@Bean
public StpLogic getStpLogicJwt() {
@@ -40,4 +43,12 @@
return new PlusSaTokenDao();
}
+ /**
+ * 寮傚父澶勭悊鍣�
+ */
+ @Bean
+ public SaTokenExceptionHandler saTokenExceptionHandler() {
+ return new SaTokenExceptionHandler();
+ }
+
}
--
Gitblit v1.9.3