@@ -426,7 +426,7 @@ public class AliyunOssTemplate implements FileStorageTemplate {
if (ObjectUtils.isEmpty(files)) {
return;
}
- files.stream().forEach(file -> {
+ files.parallelStream().forEach(file -> {
this.copyObject(sourceBucketName, file, targetBucketName ,file.replace(sourcePath, targetPath));
});
} catch (Exception e) {
@@ -253,9 +253,7 @@ public class AwsTemplate implements FileStorageTemplate {
// 复制文件
sourceKeyList.parallelStream().forEach(key -> {
- log.info("开始复制:" + key);
amazonS3Client.copyObject(bucket, key, toBucket, key.replace(oldPath, newPath));
- log.info("复制成功:" + key);
CopyObjectResult copyObjectResult = amazonS3Client.copyObject(bucket, oldPath, toBucket, newPath);
@@ -440,7 +440,7 @@ public class CosTemplate implements FileStorageTemplate {
this.copyObject(sourceBucketName, file, targetBucketName, file.replace(sourcePath, targetPath));
@@ -474,7 +474,7 @@ public class MinioTemplate implements FileStorageTemplate {