add(req-2080):上传文件到华为云--代码优化
This commit is contained in:
parent
86fc1c7724
commit
1cc434a09c
@ -39,8 +39,10 @@ public class HuaWeiCloudObsClient implements OssClientBase {
|
||||
@PostConstruct
|
||||
@Override
|
||||
public void initClient() {
|
||||
log.info("initClient endpoint = {}, accessKeyId = {},secretAccessKey = {}", huaWeiCloudObsConfig.getEndPoint(),
|
||||
huaWeiCloudObsConfig.getAccessKeyId(), huaWeiCloudObsConfig.getSecretAccessKey());
|
||||
log.info("accessKeyId = {},secretAccessKey = {}, initClient endpoint = {}",
|
||||
huaWeiCloudObsConfig.getAccessKeyId(),
|
||||
huaWeiCloudObsConfig.getSecretAccessKey(),
|
||||
huaWeiCloudObsConfig.getEndPoint());
|
||||
try {
|
||||
instance = new ObsClient(
|
||||
huaWeiCloudObsConfig.getAccessKeyId(),
|
||||
|
||||
@ -3,7 +3,7 @@ package cn.axzo.oss.integration.s3.config;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* 华为云对象存储服务OBS配置
|
||||
@ -11,8 +11,8 @@ import org.springframework.stereotype.Component;
|
||||
* @author hucf
|
||||
* @since 2024/1/12 15:11
|
||||
**/
|
||||
@Configuration
|
||||
@RefreshScope
|
||||
@Component
|
||||
@Data
|
||||
public class HuaWeiCloudObsConfig {
|
||||
@Value("${huaweicloud.obs.accessKeyId}")
|
||||
@ -21,9 +21,6 @@ public class HuaWeiCloudObsConfig {
|
||||
@Value("${huaweicloud.obs.secretAccessKey}")
|
||||
private String secretAccessKey;
|
||||
|
||||
@Value("${huaweicloud.obs.secretAccessKey}")
|
||||
@Value("${huaweicloud.obs.endpoint}")
|
||||
private String endPoint;
|
||||
|
||||
@Value("${huaweicloud.obs.bucket}")
|
||||
private String bucket;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user