mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-06-21 19:32:41 +08:00
fixed: minio的domain为域名无法上传文件
This commit is contained in:
parent
3ea07739d1
commit
12c4b810c2
@ -77,8 +77,11 @@ public class S3Util {
|
|||||||
new AwsClientBuilder.EndpointConfiguration(
|
new AwsClientBuilder.EndpointConfiguration(
|
||||||
defaultConfig.getEndpoint(), defaultConfig.getRegion());
|
defaultConfig.getEndpoint(), defaultConfig.getRegion());
|
||||||
|
|
||||||
return AmazonS3ClientBuilder.standard()
|
AmazonS3ClientBuilder builder = AmazonS3ClientBuilder.standard();
|
||||||
.withCredentials(new AWSStaticCredentialsProvider(credentials))
|
// 开启路径访问
|
||||||
|
builder.setPathStyleAccessEnabled(true);
|
||||||
|
|
||||||
|
return builder.withCredentials(new AWSStaticCredentialsProvider(credentials))
|
||||||
.withEndpointConfiguration(endpointConfiguration)
|
.withEndpointConfiguration(endpointConfiguration)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
5
pom.xml
5
pom.xml
@ -102,6 +102,11 @@
|
|||||||
<artifactId>aws-java-sdk-s3</artifactId>
|
<artifactId>aws-java-sdk-s3</artifactId>
|
||||||
<version>1.12.572</version>
|
<version>1.12.572</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.xml.bind</groupId>
|
||||||
|
<artifactId>jaxb-api</artifactId>
|
||||||
|
<version>2.3.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.hutool</groupId>
|
<groupId>cn.hutool</groupId>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user