From 1f42bd3d22c104aaa2d780c20a555b5e467858bf Mon Sep 17 00:00:00 2001 From: MichelleChung <1242874891@qq.com> Date: 星期一, 07 十一月 2022 22:10:52 +0800 Subject: [PATCH] !245 数据源由 Druid 修改为 Hikari * update 更新 dataSource 数据源, 由 druid 修改为 hikari, 更新相关配置 ; --- ruoyi-framework/src/main/java/com/ruoyi/framework/config/SaTokenConfig.java | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SaTokenConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SaTokenConfig.java index a5be267..a7c51fa 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SaTokenConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SaTokenConfig.java @@ -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,14 +33,14 @@ @Override public void addInterceptors(InterceptorRegistry registry) { // 娉ㄥ唽璺敱鎷︽埅鍣紝鑷畾涔夐獙璇佽鍒� - registry.addInterceptor(new SaRouteInterceptor((request, response, handler) -> { + registry.addInterceptor(new SaInterceptor(handler -> { + // 鑷畾涔夋敞瑙� @Anonymous 鍖垮悕璁块棶閰嶇疆锛屽悗缁増鏈皢鍒犻櫎 ExcludeUrlProperties excludeUrlProperties = SpringUtils.getBean(ExcludeUrlProperties.class); // 鐧诲綍楠岃瘉 -- 鎺掗櫎澶氫釜璺緞 SaRouter // 鑾峰彇鎵�鏈夌殑 .match("/**") - // 鎺掗櫎涓嬩笉闇�瑕佹嫤鎴殑 - .notMatch(securityProperties.getExcludes()) + // 鎺掗櫎涓嬩笉闇�瑕佹嫤鎴殑锛堟瘡娆″尮閰嶏級 .notMatch(excludeUrlProperties.getExcludes()) // 瀵规湭鎺掗櫎鐨勮矾寰勮繘琛屾鏌� .check(() -> { @@ -55,8 +54,9 @@ // } }); - })).addPathPatterns("/**"); - registry.addInterceptor(new SaAnnotationInterceptor()).addPathPatterns("/**"); + })).addPathPatterns("/**") + // 鎺掗櫎涓嶉渶瑕佹嫤鎴殑璺緞 + .excludePathPatterns(securityProperties.getExcludes()); } @Bean -- Gitblit v1.9.3