关注公众号 风色年代(itfantasycc) 500G Java微服务资料合集送上~

SpringCloud 2020.x.x工程bootstrap引导配置不生效的解决方案_spring cloud

注意:2020版本以后,添加spring-cloud-context是没有用的,因为官方重构了bootstrap引导配置的加载方式

需要增加如下依赖:

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>

官方文档:
​​​ https://docs.spring.io/spring-cloud-config/docs/current/reference/html/#config-first-bootstrap​

其他参考:

 关注公众号 风色年代(itfantasycc) 500G Java微服务资料合集送上~

SpringCloud 2020.x.x工程bootstrap引导配置不生效的解决方案_spring cloud