diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/CacheService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/CacheService.java index 33d17ac46..b9680671b 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/CacheService.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/CacheService.java @@ -1,6 +1,7 @@ package com.ruoyi.framework.web.service; import java.util.Set; +import java.util.TreeSet; import org.apache.commons.lang3.ArrayUtils; import org.springframework.stereotype.Service; import com.ruoyi.common.constant.Constants; @@ -33,7 +34,7 @@ public class CacheService */ public Set getCacheKeys(String cacheName) { - return CacheUtils.getCache(cacheName).keys(); + return new TreeSet<>(CacheUtils.getCache(cacheName).keys()); } /**