From 56050aa6501f3d9d2f79a2c40a28815878ac56ee Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期四, 24 十一月 2022 15:14:47 +0800 Subject: [PATCH] update 同步 ruoyi 相关提交 * fix 修复Log注解GET请求记录不到参数问题 * fix 修复某些特性的环境生成代码变乱码TXT文件问题 * update 消除Vue3控制台出现的警告信息 * fix 开启TopNav没有子菜单隐藏侧边栏 * fix 修复回显数据字典数组异常问题(I60UYQ) * update 忽略不必要的属性数据返回 --- ruoyi-oss/src/main/java/com/ruoyi/oss/factory/OssFactory.java | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ruoyi-oss/src/main/java/com/ruoyi/oss/factory/OssFactory.java b/ruoyi-oss/src/main/java/com/ruoyi/oss/factory/OssFactory.java index 7065c4a..c3312d7 100644 --- a/ruoyi-oss/src/main/java/com/ruoyi/oss/factory/OssFactory.java +++ b/ruoyi-oss/src/main/java/com/ruoyi/oss/factory/OssFactory.java @@ -1,7 +1,9 @@ package com.ruoyi.oss.factory; +import com.ruoyi.common.constant.CacheNames; import com.ruoyi.common.utils.JsonUtils; import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.common.utils.redis.CacheUtils; import com.ruoyi.common.utils.redis.RedisUtils; import com.ruoyi.oss.constant.OssConstant; import com.ruoyi.oss.core.OssClient; @@ -27,7 +29,7 @@ */ public static void init() { log.info("鍒濆鍖朞SS宸ュ巶"); - RedisUtils.subscribe(OssConstant.CACHE_CONFIG_KEY, String.class, configKey -> { + RedisUtils.subscribe(OssConstant.DEFAULT_CONFIG_KEY, String.class, configKey -> { OssClient client = getClient(configKey); // 鏈垵濮嬪寲涓嶅鐞� if (client != null) { @@ -42,7 +44,7 @@ */ public static OssClient instance() { // 鑾峰彇redis 榛樿绫诲瀷 - String configKey = RedisUtils.getCacheObject(OssConstant.CACHE_CONFIG_KEY); + String configKey = RedisUtils.getCacheObject(OssConstant.DEFAULT_CONFIG_KEY); if (StringUtils.isEmpty(configKey)) { throw new OssException("鏂囦欢瀛樺偍鏈嶅姟绫诲瀷鏃犳硶鎵惧埌!"); } @@ -62,11 +64,11 @@ } private static void refresh(String configKey) { - Object json = RedisUtils.getCacheObject(OssConstant.SYS_OSS_KEY + configKey); - OssProperties properties = JsonUtils.parseObject(json.toString(), OssProperties.class); - if (properties == null) { + String json = CacheUtils.get(CacheNames.SYS_OSS_CONFIG, configKey); + if (json == null) { throw new OssException("绯荤粺寮傚父, '" + configKey + "'閰嶇疆淇℃伅涓嶅瓨鍦�!"); } + OssProperties properties = JsonUtils.parseObject(json, OssProperties.class); CLIENT_CACHE.put(configKey, new OssClient(configKey, properties)); } -- Gitblit v1.9.3