mirror of https://gitee.com/stylefeng/roses
【8.1.3】【file】更新一个变量名称
parent
e63108cc96
commit
3761183f98
|
@ -55,6 +55,6 @@ public class AliyunOssProperties {
|
|||
/**
|
||||
* 获取资源前缀是否为https
|
||||
*/
|
||||
private Boolean isHttps = false;
|
||||
private Boolean httpsFlag = false;
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue