src/main/java/com/ruoyi/common/constant/CacheConstants.java
@@ -8,6 +8,25 @@ public class CacheConstants { /** * Redis key 最上层前缀(按项目隔离,取 spring.profiles.active 的值) * 由 com.ruoyi.framework.config.RedisKeyConfig 在启动时注入; * 取不到时为空串,等价于不加前缀,行为退回原状作为兜底。 */ public static String PREFIX = ""; public static void setPrefix(String prefix) { if (prefix == null || prefix.isEmpty()) { PREFIX = ""; } else { PREFIX = prefix + ":"; } } /** * 登录用户 redis key */ public static final String LOGIN_TOKEN_KEY = "login_tokens:";