From aa2c3d4deba76ade0958ff3ced88396e226a4964 Mon Sep 17 00:00:00 2001
From: duhuizhe <271000472@qq.com>
Date: 星期三, 15 五月 2024 19:57:40 +0800
Subject: [PATCH] 项目启动失败问题解决

---
 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/RedisService.java |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/RedisService.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/RedisService.java
index 725a49b..2a2001c 100644
--- a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/RedisService.java
+++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/RedisService.java
@@ -1,7 +1,7 @@
 package com.nuvole.four.service;
 
 import com.nuvole.four.domain.extend.AppDTO;
-import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.commons.lang3.StringEscapeUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.*;
@@ -57,7 +57,7 @@
             Map map = new HashMap();
             // todo xuekang
             // StringEscapeUtils.unescapeHtml4(key)
-            map.put("key",StringEscapeUtils.unescapeHtml(key));
+            map.put("key", StringEscapeUtils.unescapeHtml4(key));
             map.put("value",value);
             dto.setMap(map);
             AppDTO s = new AppDTO();
@@ -84,7 +84,7 @@
             ValueOperations<Serializable, Object> operations = redisTemplate.opsForValue();
             AppDTO dto = new AppDTO();
             Map map = new HashMap();
-            map.put("key",StringEscapeUtils.unescapeHtml(key));
+            map.put("key",StringEscapeUtils.unescapeHtml4(key));
             map.put("value",value);
             map.put("expireTime",expireTime);
             map.put("timeUnit",timeUnit);
@@ -131,7 +131,7 @@
      */
     public void remove(final String key) {
         if (exists(key)) {
-            redisTemplate.delete(StringEscapeUtils.unescapeHtml(key));
+            redisTemplate.delete(StringEscapeUtils.unescapeHtml4(key));
         }
     }
 
@@ -144,7 +144,7 @@
     public boolean exists(final String key) {
         AppDTO dto = new AppDTO();
         Map map = new HashMap();
-        map.put("key",StringEscapeUtils.unescapeHtml(key));
+        map.put("key",StringEscapeUtils.unescapeHtml4(key));
         dto.setMap(map);
         AppDTO s = new AppDTO();
         BeanUtils.copyProperties(dto,s);
@@ -163,7 +163,7 @@
         ValueOperations<Serializable, Object> operations = redisTemplate.opsForValue();
         AppDTO dto = new AppDTO();
         Map map = new HashMap();
-        map.put("key",StringEscapeUtils.unescapeHtml(key));
+        map.put("key",StringEscapeUtils.unescapeHtml4(key));
         dto.setMap(map);
         AppDTO s = new AppDTO();
         BeanUtils.copyProperties(dto,s);

--
Gitblit v1.9.1