From e30fa57ab45b5baaab4518c5bd1b8abf81469bdf Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期一, 22 十一月 2021 02:42:14 +0800 Subject: [PATCH] update DictUtils 字典工具类 标记过期 3.5.0 版本移除 使用 DictService 代替 --- ruoyi-oss/src/main/java/com/ruoyi/oss/factory/OssFactory.java | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 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 ecb269d..b5de001 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 @@ -24,18 +24,22 @@ @Slf4j public class OssFactory { - static { - RedisUtils.subscribe(CloudConstant.CACHE_CONFIG_KEY, String.class, msg -> { - refreshService(msg); - log.info("璁㈤槄鍒锋柊OSS閰嶇疆 => " + msg); - }); - } - /** * 鏈嶅姟瀹炰緥缂撳瓨 */ private static final Map<String, ICloudStorageStrategy> SERVICES = new ConcurrentHashMap<>(); + /** + * 鍒濆鍖栧伐鍘� + */ + public static void init() { + log.info("鍒濆鍖朞SS宸ュ巶"); + RedisUtils.subscribe(CloudConstant.CACHE_CONFIG_KEY, String.class, msg -> { + refreshService(msg); + log.info("璁㈤槄鍒锋柊OSS閰嶇疆 => " + msg); + }); + } + /** * 鑾峰彇榛樿瀹炰緥 */ -- Gitblit v1.9.3