From 94be46d065691d45d95527d748d85d5496af6b79 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期四, 26 八月 2021 18:03:33 +0800 Subject: [PATCH] fix 修复定时器工具编写错误问题 --- ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/QcloudCloudStorageStrategy.java | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/QcloudCloudStorageStrategy.java b/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/QcloudCloudStorageStrategy.java index c30dcbd..7b7ae63 100644 --- a/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/QcloudCloudStorageStrategy.java +++ b/ruoyi-oss/src/main/java/com/ruoyi/oss/service/impl/QcloudCloudStorageStrategy.java @@ -24,9 +24,10 @@ */ public class QcloudCloudStorageStrategy extends AbstractCloudStorageStrategy { - private final COSClient client; + private COSClient client; - public QcloudCloudStorageStrategy(CloudStorageProperties cloudStorageProperties) { + @Override + public void init(CloudStorageProperties cloudStorageProperties) { properties = cloudStorageProperties; try { COSCredentials credentials = new BasicCOSCredentials( @@ -43,7 +44,7 @@ client = new COSClient(credentials, clientConfig); createBucket(); } catch (Exception e) { - throw new IllegalArgumentException("鑵捐浜戝瓨鍌ㄩ厤缃敊璇�! 璇锋鏌ョ郴缁熼厤缃�!"); + throw new OssException("鑵捐浜戝瓨鍌ㄩ厤缃敊璇�! 璇锋鏌ョ郴缁熼厤缃�!"); } } -- Gitblit v1.9.3