7

Spring bootstrap.yml 不管用,失效解决方案(spring cloud 2020.x.x)

 3 years ago
source link: http://www.blogjava.net/paulwong/archive/2021/12/01/436076.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Spring bootstrap.yml 不管用,失效解决方案(spring cloud 2020.x.x)

My Links

Blog Stats

  • Posts - 1114
  • Stories - 10
  • Comments - 108
  • Trackbacks - 0

留言簿(49)

随笔分类(1294)

随笔档案(1069)

文章分类(7)

文章档案(10)

收藏夹(2)

Develop

E-BOOK

Other

阅读排行榜

评论排行榜

60天内阅读排行

Spring bootstrap.yml 不管用,失效解决方案(spring cloud 2020.x.x)

升级spring cloud版本之后发现bootstrap.yml 失效了,阅读官方文档得知,需要新增一个引用来开启bootstrap.xml文件的读取,新版spring cloud默认是关闭读取了。
增加依赖如下即可:
<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
watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3hxOTI5NjA5OTY4,size_16,color_FFFFFF,t_70

posted on 2021-12-01 10:29 paulwong 阅读(8) 评论(0)  编辑  收藏 所属分类: SPRING CLOUD

Powered by:
BlogJava
Copyright © paulwong


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK