升级到2.4.0后,SpringCloud配置客户端无法从配置服务器获取/加载配置文件
升级到spring-cloud版本后,spring-cloud-config-client无法从spring-cloud-config-server读取配置文件2.4.02020.0.0-M6
回答
从 spring-boot 2.4.0 版本开始,bootstrapping 默认不开启,需要在你的 build.gradle
implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap'
或者 pom.xml
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
- Why would they remove it though? Been battling with for almost 4 hours
THE END
二维码