【8.1.3】【file】更新一个变量名称

dev-8.1.9
fengshuonan 2024-03-15 18:45:19 +08:00
parent e63108cc96
commit 3761183f98
2 changed files with 6 additions and 3 deletions

View File

@ -55,6 +55,6 @@ public class AliyunOssProperties {
/**
* https
*/
private Boolean isHttps = false;
private Boolean httpsFlag = false;
}

View File

@ -71,9 +71,12 @@ public class AliyunFileOperator implements FileOperatorApi {
String endpoint = aliyunOssProperties.getEndPoint();
String accessKeyId = aliyunOssProperties.getAccessKeyId();
String accessKeySecret = aliyunOssProperties.getAccessKeySecret();
Boolean isHttps = aliyunOssProperties.getIsHttps();
// 根据https开关配置协议类型
Boolean httpsFlag = aliyunOssProperties.getHttpsFlag();
ClientBuilderConfiguration clientBuilderConfiguration = new ClientBuilderConfiguration();
clientBuilderConfiguration.setProtocol(isHttps ? Protocol.HTTPS : Protocol.HTTP);
clientBuilderConfiguration.setProtocol(httpsFlag ? Protocol.HTTPS : Protocol.HTTP);
// 创建OSSClient实例。
ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret, clientBuilderConfiguration);
}