From eaeb324c74c12e09c4c7f5b1dfbdf2943905cd89 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期六, 08 一月 2022 18:41:42 +0800 Subject: [PATCH] update 指定 maven 资源过滤为具体文件 防止错误过滤 --- ruoyi-common/src/main/java/com/ruoyi/common/utils/redis/RedisUtils.java | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/redis/RedisUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/redis/RedisUtils.java index aa5c0dc..49ec4ed 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/redis/RedisUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/redis/RedisUtils.java @@ -376,4 +376,14 @@ Iterable<String> iterable = CLIENT.getKeys().getKeysByPattern(pattern); return IterUtil.toList(iterable); } + + /** + * 妫�鏌edis涓槸鍚﹀瓨鍦╧ey + * + * @param key 閿� + */ + public static Boolean hasKey(String key) { + RKeys rKeys = CLIENT.getKeys(); + return rKeys.countExists(key) > 0; + } } -- Gitblit v1.9.3