首页 > 其他分享 >SpringCloud 2020.x.x工程bootstrap引导配置不生效的解决方案

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

时间:2023-01-06 10:07:59浏览次数:53  
标签:Java SpringCloud bootstrap itfantasycc 2020 spring 500G cloud


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

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

注意: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

标签:Java,SpringCloud,bootstrap,itfantasycc,2020,spring,500G,cloud
From: https://blog.51cto.com/kenkao/5992101

相关文章