From 59fd7eeeb3a233c288e2440b65f59d11b16c4620 Mon Sep 17 00:00:00 2001 From: 秋辞未寒 <545073804@qq.com> Date: 星期二, 10 十二月 2024 17:55:11 +0800 Subject: [PATCH] add 新增 基于Redisson的发号器工具 --- ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/config/SaTokenConfig.java | 12 ++++++++++-- 1 files changed, 10 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 aef8a66..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 @@ -7,10 +7,10 @@ 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.context.annotation.PropertySource; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; /** * sa-token 閰嶇疆 @@ -19,7 +19,7 @@ */ @AutoConfiguration @PropertySource(value = "classpath:common-satoken.yml", factory = YmlPropertySourceFactory.class) -public class SaTokenConfig implements WebMvcConfigurer { +public class SaTokenConfig { @Bean public StpLogic getStpLogicJwt() { @@ -43,4 +43,12 @@ return new PlusSaTokenDao(); } + /** + * 寮傚父澶勭悊鍣� + */ + @Bean + public SaTokenExceptionHandler saTokenExceptionHandler() { + return new SaTokenExceptionHandler(); + } + } -- Gitblit v1.9.3