Search in sources :

Example 1 with OssProperties

use of com.ruoyi.oss.properties.OssProperties in project RuoYi-Vue-Plus by JavaLionLi.

the class OssFactory method refresh.

private static void refresh(String type) {
    Object json = RedisUtils.getCacheObject(OssConstant.SYS_OSS_KEY + type);
    OssProperties properties = JsonUtils.parseObject(json.toString(), OssProperties.class);
    if (properties == null) {
        throw new OssException("系统异常, '" + type + "'配置信息不存在!");
    }
    getStrategy(type).init(properties);
}
Also used : OssProperties(com.ruoyi.oss.properties.OssProperties) OssException(com.ruoyi.oss.exception.OssException)

Example 2 with OssProperties

use of com.ruoyi.oss.properties.OssProperties in project RuoYi-Flowable-Plus by KonBAI-Q.

the class OssFactory method refresh.

private static void refresh(String type) {
    Object json = RedisUtils.getCacheObject(OssConstant.SYS_OSS_KEY + type);
    OssProperties properties = JsonUtils.parseObject(json.toString(), OssProperties.class);
    if (properties == null) {
        throw new OssException("系统异常, '" + type + "'配置信息不存在!");
    }
    getStrategy(type).init(properties);
}
Also used : OssProperties(com.ruoyi.oss.properties.OssProperties) OssException(com.ruoyi.oss.exception.OssException)

Aggregations

OssException (com.ruoyi.oss.exception.OssException)2 OssProperties (com.ruoyi.oss.properties.OssProperties)2