|
@@ -1,5 +1,6 @@
|
|
package com.tzld.piaoquan.recommend.feature.produce.service;
|
|
package com.tzld.piaoquan.recommend.feature.produce.service;
|
|
|
|
|
|
|
|
+import com.aliyun.oss.ClientException;
|
|
import com.aliyun.oss.OSS;
|
|
import com.aliyun.oss.OSS;
|
|
import com.aliyun.oss.OSSClientBuilder;
|
|
import com.aliyun.oss.OSSClientBuilder;
|
|
import com.aliyun.oss.OSSException;
|
|
import com.aliyun.oss.OSSException;
|
|
@@ -18,7 +19,7 @@ import java.util.List;
|
|
public class OSSService implements Serializable {
|
|
public class OSSService implements Serializable {
|
|
private String accessId = "LTAI5tHMkNaRhpiDB1yWMZPn";
|
|
private String accessId = "LTAI5tHMkNaRhpiDB1yWMZPn";
|
|
private String accessKey = "XLi5YUJusVwbbQOaGeGsaRJ1Qyzbui";
|
|
private String accessKey = "XLi5YUJusVwbbQOaGeGsaRJ1Qyzbui";
|
|
- private String endpoint = "https://oss-cn-hangzhou.aliyuncs.com";
|
|
|
|
|
|
+ private String endpoint = "https://oss-cn-hangzhou-internal.aliyuncs.com";
|
|
|
|
|
|
public void transToDeepColdArchive(String bucketName, List<String> objectNames) {
|
|
public void transToDeepColdArchive(String bucketName, List<String> objectNames) {
|
|
OSS ossClient = new OSSClientBuilder().build(endpoint, accessId, accessKey);
|
|
OSS ossClient = new OSSClientBuilder().build(endpoint, accessId, accessKey);
|
|
@@ -39,6 +40,8 @@ public class OSSService implements Serializable {
|
|
} else {
|
|
} else {
|
|
throw oe;
|
|
throw oe;
|
|
}
|
|
}
|
|
|
|
+ } catch (ClientException ce) {
|
|
|
|
+ throw new ClientException(objectName);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (ossClient != null) {
|
|
if (ossClient != null) {
|