From cb913a9adcbe83b5688478cf538f11631b1270da Mon Sep 17 00:00:00 2001
From: fanc <1571025887@qq.com>
Date: 星期四, 25 一月 2024 14:48:29 +0800
Subject: [PATCH] fix 提升锁的作用域 并采用双重校验锁

---
 ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/handler/MybatisExceptionHandler.java |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/handler/MybatisExceptionHandler.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/handler/MybatisExceptionHandler.java
index 64463e6..c517fa7 100644
--- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/handler/MybatisExceptionHandler.java
+++ b/ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/handler/MybatisExceptionHandler.java
@@ -35,7 +35,7 @@
     public R<Void> handleCannotFindDataSourceException(MyBatisSystemException e, HttpServletRequest request) {
         String requestURI = request.getRequestURI();
         String message = e.getMessage();
-        if (message.contains("CannotFindDataSourceException")) {
+        if ("CannotFindDataSourceException".contains(message)) {
             log.error("璇锋眰鍦板潃'{}', 鏈壘鍒版暟鎹簮", requestURI);
             return R.fail("鏈壘鍒版暟鎹簮锛岃鑱旂郴绠$悊鍛樼‘璁�");
         }

--
Gitblit v1.9.3