|
|
@ -59,7 +59,6 @@ import com.amazonaws.AmazonServiceException; |
|
|
|
import com.amazonaws.auth.AWSStaticCredentialsProvider; |
|
|
|
import com.amazonaws.auth.AWSStaticCredentialsProvider; |
|
|
|
import com.amazonaws.auth.BasicAWSCredentials; |
|
|
|
import com.amazonaws.auth.BasicAWSCredentials; |
|
|
|
import com.amazonaws.client.builder.AwsClientBuilder; |
|
|
|
import com.amazonaws.client.builder.AwsClientBuilder; |
|
|
|
import com.amazonaws.regions.Regions; |
|
|
|
|
|
|
|
import com.amazonaws.services.s3.AmazonS3; |
|
|
|
import com.amazonaws.services.s3.AmazonS3; |
|
|
|
import com.amazonaws.services.s3.AmazonS3ClientBuilder; |
|
|
|
import com.amazonaws.services.s3.AmazonS3ClientBuilder; |
|
|
|
import com.amazonaws.services.s3.model.AmazonS3Exception; |
|
|
|
import com.amazonaws.services.s3.model.AmazonS3Exception; |
|
|
@ -110,7 +109,7 @@ public class S3StorageOperator implements Closeable, StorageOperate { |
|
|
|
.standard() |
|
|
|
.standard() |
|
|
|
.withPathStyleAccessEnabled(true) |
|
|
|
.withPathStyleAccessEnabled(true) |
|
|
|
.withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration( |
|
|
|
.withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration( |
|
|
|
endPoint, Regions.fromName(region).getName())) |
|
|
|
endPoint, region)) |
|
|
|
.withCredentials( |
|
|
|
.withCredentials( |
|
|
|
new AWSStaticCredentialsProvider(new BasicAWSCredentials(accessKeyId, accessKeySecret))) |
|
|
|
new AWSStaticCredentialsProvider(new BasicAWSCredentials(accessKeyId, accessKeySecret))) |
|
|
|
.build(); |
|
|
|
.build(); |
|
|
@ -119,7 +118,7 @@ public class S3StorageOperator implements Closeable, StorageOperate { |
|
|
|
.standard() |
|
|
|
.standard() |
|
|
|
.withCredentials( |
|
|
|
.withCredentials( |
|
|
|
new AWSStaticCredentialsProvider(new BasicAWSCredentials(accessKeyId, accessKeySecret))) |
|
|
|
new AWSStaticCredentialsProvider(new BasicAWSCredentials(accessKeyId, accessKeySecret))) |
|
|
|
.withRegion(Regions.fromName(region)) |
|
|
|
.withRegion(region) |
|
|
|
.build(); |
|
|
|
.build(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|