我是靠谱客的博主 年轻星月,这篇文章主要介绍OBS学习笔记-SpringBoot集成华为云配置,现在分享给大家,希望可以做个参考。

1、依赖包导入

<!-- 依赖包 -->
<dependency>
<groupId>com.huaweicloud</groupId>
<artifactId>esdk-obs-java</artifactId>
<version>3.22.3.1</version>
</dependency>

2、自动配置引入

@Getter
@Setter
@Component("huaWeiYunOssProperties")
@ConfigurationProperties(prefix = "huaweiyun.oss")
public class HuaWeiYunOssProperties {
private String accessKeyId = null;
private String accessKeySecret = null;
private String domain = null;
private String endpoint = "";
/** 持续时间(秒) */
private Long duration = 300L;
private String bucket;
}
@BeanComponentScan(basePackages = { Constants.SERVICE_PACKAGE }, annotationClass = Service.class)
@EnableConfigurationProperties({ HuaWeiYunOssProperties.class })
@Conf

最后

以上就是年轻星月最近收集整理的关于OBS学习笔记-SpringBoot集成华为云配置的全部内容,更多相关OBS学习笔记-SpringBoot集成华为云配置内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(141)

评论列表共有 0 条评论

立即
投稿
返回
顶部