|
|
|
@ -83,10 +83,10 @@ public class OssClient {
|
|
|
|
|
StaticCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
|
|
|
|
|
AwsBasicCredentials.create(properties.getAccessKey(), properties.getSecretKey()));
|
|
|
|
|
|
|
|
|
|
//使用对象存储服务时要求明确配置访问样式(路径样式或虚拟托管样式)。需要启用路径样式访问
|
|
|
|
|
boolean isStyle = true;
|
|
|
|
|
// MinIO 使用 HTTPS 限制使用域名访问,站点填域名。需要启用路径样式访问
|
|
|
|
|
boolean isStyle = !StringUtils.containsAny(properties.getEndpoint(), OssConstant.CLOUD_SERVICE);
|
|
|
|
|
|
|
|
|
|
//创建AWS基于 CRT 的 S3 客户端
|
|
|
|
|
// 创建AWS基于 CRT 的 S3 客户端
|
|
|
|
|
this.client = S3AsyncClient.crtBuilder()
|
|
|
|
|
.credentialsProvider(credentialsProvider)
|
|
|
|
|
.endpointOverride(URI.create(getEndpoint()))
|
|
|
|
|