update 优化 RedisUtils.getCacheObject 的返回值处理

This commit is contained in:
疯狂的狮子Li 2021-11-22 02:45:50 +08:00
parent 20eea9914e
commit 6c053b6266

View File

@ -1,6 +1,5 @@
package com.ruoyi.oss.factory;
import cn.hutool.core.convert.Convert;
import com.ruoyi.common.utils.JsonUtils;
import com.ruoyi.common.utils.RedisUtils;
import com.ruoyi.common.utils.StringUtils;
@ -45,7 +44,7 @@ public class OssFactory {
*/
public static ICloudStorageStrategy instance() {
// 获取redis 默认类型
String type = Convert.toStr(RedisUtils.getCacheObject(CloudConstant.CACHE_CONFIG_KEY));
String type = RedisUtils.getCacheObject(CloudConstant.CACHE_CONFIG_KEY);
if (StringUtils.isEmpty(type)) {
throw new OssException("文件存储服务类型无法找到!");
}