oss连接出现java.lang.IllegalArgumentException: Oss endpoint can't be empty.问题
场景:
在bootstrap.properties中编写nacos的配置,读取在nacos中定义的数据集连接oss
springboot版本为2.6.8
结果就出现了以上错误
原因:
通过查找资料后发现,在springboot2.4之后,就不会默认在加载bootstrap.properties文件
官网描述如下:

解决方法:
将bootstrap的stater引入即可
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>

浙公网安备 33010602011771号