spring云配置服务器-带占位符的文件系统后端搜索位置

spring云配置服务器-带占位符的文件系统后端搜索位置,spring,spring-cloud,Spring,Spring Cloud,搜索位置可以包含{application}的占位符, {profile}和{label} 我试图将我的属性分离到不同的目录中,如/app1/dev、/app2/dev、/app2/prod 我已在配置服务器的application.yml中设置了searchLocations属性,如下所示 spring: application: name: config-server profiles: active: native cloud: config: server:

搜索位置可以包含{application}的占位符, {profile}和{label}

我试图将我的属性分离到不同的目录中,如/app1/dev、/app2/dev、/app2/prod

我已在配置服务器的application.yml中设置了searchLocations属性,如下所示

spring:
 application:
  name: config-server   
 profiles:
  active: native
 cloud:
  config:
   server:
    native:
     #searchLocations: file:./config/{application},file:./config/{application}/{profile} # Trial 01
     searchLocations: file:./config/,file:./config/{application},file:./config/{application}/{profile} # Trial 02
我将属性保存在目录中,如zuul/prod、zuul/test 但是配置服务器无法为这些配置提供服务

对于请求
http://localhost:8082/zuul/prod
它给出了

{“name”:“zuul”,“profile”:[“prod”],“label”:“master”,“propertySources”:[]}

请澄清如何实现这种隔离


环境:Spring Cloud Angel.SR2和3

仅在Brixton,这是一项新功能。@Spencergib谢谢。我将在Brixton.SR之后配置它。文档没有区分Angel/Brixton中的功能。这是Angel的文档