📅  最后修改于: 2022-03-11 14:52:08.704000             🧑  作者: Mango
@Bean
public AmazonS3 generateS3Client() {
AWSCredentials credentials = new BasicAWSCredentials(accessKey, secretKey);
AmazonS3 s3client = AmazonS3ClientBuilder
.standard()
.withCredentials(new AWSStaticCredentialsProvider(credentials))
.withRegion(Regions.US_EAST_1)
.build();
return s3client;
}