SpringCloud 2.4版本之后不再优先读取bootstrap文件,导致bootstrap不起作用
需要在pom.xml文件中引入如下依赖后,就可以正常读取bootstrap.yml配置文件了
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-bootstrap</artifactId> </dependency>