From 111db70908022e5716d30d0ba307438287c190fe Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期三, 14 九月 2022 14:44:11 +0800
Subject: [PATCH] !233 【轻量级 PR】修正控制台日志打印格式化问题 Merge pull request !233 from MichelleChung/dev

---
 ruoyi-common/src/main/java/com/ruoyi/common/utils/JsonUtils.java |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/JsonUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/JsonUtils.java
index 446bf1b..e5c471e 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/JsonUtils.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/JsonUtils.java
@@ -6,6 +6,7 @@
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.exc.MismatchedInputException;
 import com.ruoyi.common.utils.spring.SpringUtils;
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
@@ -78,6 +79,9 @@
         }
         try {
             return OBJECT_MAPPER.readValue(text, OBJECT_MAPPER.getTypeFactory().constructType(Dict.class));
+        } catch (MismatchedInputException e) {
+            // 绫诲瀷涓嶅尮閰嶈鏄庝笉鏄痡son
+            return null;
         } catch (IOException e) {
             throw new RuntimeException(e);
         }

--
Gitblit v1.9.3