From bae04335519f30e25f551771a3902bdb46808d9d Mon Sep 17 00:00:00 2001 From: "everywhere.z" Date: Mon, 13 Nov 2023 18:17:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4RMapCache=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=97=B6=E7=9A=84CodeC=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yomahub/liteflow/parser/redis/mode/RClient.java | 2 +- .../test/redis/RedisWithXmlELSubscribeSpringbootTest.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/liteflow-rule-plugin/liteflow-rule-redis/src/main/java/com/yomahub/liteflow/parser/redis/mode/RClient.java b/liteflow-rule-plugin/liteflow-rule-redis/src/main/java/com/yomahub/liteflow/parser/redis/mode/RClient.java index 535dcd648..7b9e06f23 100644 --- a/liteflow-rule-plugin/liteflow-rule-redis/src/main/java/com/yomahub/liteflow/parser/redis/mode/RClient.java +++ b/liteflow-rule-plugin/liteflow-rule-redis/src/main/java/com/yomahub/liteflow/parser/redis/mode/RClient.java @@ -37,7 +37,7 @@ public class RClient { * @return hashmap */ public Map getMap(String key) { - RMapCache mapCache = redissonClient.getMapCache(key, StringCodec.INSTANCE); + RMapCache mapCache = redissonClient.getMapCache(key); Set mapFieldSet = mapCache.keySet(); if (CollectionUtil.isEmpty(mapFieldSet)) { return map; diff --git a/liteflow-testcase-el/liteflow-testcase-el-redis-springboot/src/test/java/com/yomahub/liteflow/test/redis/RedisWithXmlELSubscribeSpringbootTest.java b/liteflow-testcase-el/liteflow-testcase-el-redis-springboot/src/test/java/com/yomahub/liteflow/test/redis/RedisWithXmlELSubscribeSpringbootTest.java index a5388e8dc..210a6c3e8 100644 --- a/liteflow-testcase-el/liteflow-testcase-el-redis-springboot/src/test/java/com/yomahub/liteflow/test/redis/RedisWithXmlELSubscribeSpringbootTest.java +++ b/liteflow-testcase-el/liteflow-testcase-el-redis-springboot/src/test/java/com/yomahub/liteflow/test/redis/RedisWithXmlELSubscribeSpringbootTest.java @@ -61,8 +61,8 @@ public class RedisWithXmlELSubscribeSpringbootTest extends BaseTest { Config config = new Config(); config.useSingleServer().setAddress("redis://127.0.0.1:6379").setDatabase(1); redissonClient = Redisson.create(config); - RMapCache chainKey = redissonClient.getMapCache("testChainKey", StringCodec.INSTANCE); - RMapCache scriptKey = redissonClient.getMapCache("testScriptKey", StringCodec.INSTANCE); + RMapCache chainKey = redissonClient.getMapCache("testChainKey"); + RMapCache scriptKey = redissonClient.getMapCache("testScriptKey"); scriptKey.put("s1:script:脚本s1:groovy", "defaultContext.setData(\"test1\",\"hello s1\");"); scriptKey.put("s2:script:脚本s2:js", "defaultContext.setData(\"test2\",\"hello s2\");"); scriptKey.put("s3:script:脚本s3", "defaultContext.setData(\"test3\",\"hello s3\");"); @@ -184,8 +184,8 @@ public class RedisWithXmlELSubscribeSpringbootTest extends BaseTest { //redis内规则数据数据清空 public static void testCleanData() { if (ObjectUtil.isNotNull(redissonClient)) { - RMapCache chainKey = redissonClient.getMapCache("testChainKey", StringCodec.INSTANCE); - RMapCache scriptKey = redissonClient.getMapCache("testScriptKey", StringCodec.INSTANCE); + RMapCache chainKey = redissonClient.getMapCache("testChainKey"); + RMapCache scriptKey = redissonClient.getMapCache("testScriptKey"); for (String key : chainKey.keySet()) { chainKey.remove(key); }