版本:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.11.RELEASE</version>
<relativePath/>
</parent><dependencyManagement><dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Dalston.SR5</version>
<type>pom</type>
<scope>import</scope>
</dependency>
测试配置,一个本地配置目录在前,一个classpath的配置在后
如下:
search-locations: file:D:\Resource, classpath:/config-repo
测试结果
结论:
配置文件是后面的优先,后面的覆盖前面