update tag module s3 config

main
wangqing 9 months ago
parent ea6ee0b5d6
commit 9a07f5b1ad

@ -18,14 +18,16 @@ public class AwsS3Config {
@Bean @Bean
public S3Client s3Client(){ public S3Client s3Client(){
AwsBasicCredentials awsBasicCredentials = AwsBasicCredentials.create("GLwHmLTZ05Kw9RyCGJXnIkua", "ynOBIqdNXH5HBgrVA29DTn4cUSh1wAI"); // AwsBasicCredentials awsBasicCredentials = AwsBasicCredentials.create("GLwHmLTZ05Kw9RyCGJXnIkua", "ynOBIqdNXH5HBgrVA29DTn4cUSh1wAI");
AwsBasicCredentials awsBasicCredentials = AwsBasicCredentials.create("YaUJkVdm3btJxproam5a", "sCkKJdcImazyae1aHWIMAGg9XZLRGh3XXYerAB48");
S3Configuration s3Config = S3Configuration.builder().pathStyleAccessEnabled(true).build(); S3Configuration s3Config = S3Configuration.builder().pathStyleAccessEnabled(true).build();
S3Client s3 = S3Client.builder() S3Client s3 = S3Client.builder()
.endpointOverride(URI.create("https://s3.bitiful.net/")) .endpointOverride(URI.create("http://cdn1.indie.cn:19000/"))
.credentialsProvider(StaticCredentialsProvider.create(awsBasicCredentials)) .credentialsProvider(StaticCredentialsProvider.create(awsBasicCredentials))
.region(region) .region(region)
.serviceConfiguration(s3Config) .serviceConfiguration(s3Config)
.build(); .build();
return s3; return s3;
} }
@ -33,9 +35,10 @@ public class AwsS3Config {
public S3Presigner s3Presigner(){ public S3Presigner s3Presigner(){
S3Configuration s3Config = S3Configuration.builder().pathStyleAccessEnabled(true).build(); S3Configuration s3Config = S3Configuration.builder().pathStyleAccessEnabled(true).build();
S3Presigner presigner = S3Presigner.builder() S3Presigner presigner = S3Presigner.builder()
.endpointOverride(URI.create("https://s3.bitiful.net/")) .endpointOverride(URI.create("http://cdn1.indie.cn:19000/"))
.region(region) .region(region)
.build(); .build();
return presigner; return presigner;
} }
} }

Loading…
Cancel
Save