我正在寻找实现12factor方法来通过Spring Cloud Config来外化配置,但我无法像预期的那样获得使用searchPaths的通配符。spring cloud config searchPaths
文档http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html#_spring_cloud_config_server提到通配符{application},{label},{profile}可以在searchPaths变量中使用,因此“您可以分隔路径中的目录并选择一种对您有意义的策略(例如,每个应用程序的子目录或每个配置文件的子目录)“
我正在寻找一个git仓库,每个配置文件有子目录(然后每个应用程序或每个应用程序的子目录(然后通过简档)
例如
spring:
cloud:
config:
server:
git:
uri: https://stash.xxx.com.au/scm/xxx/config
searchPaths: {application}
or
searchPaths: {profile}
or
searchPaths: {application}/{profile}
但是,当我在我的searchPaths中使用任何通配符{application}或{profile}时,它在git repo中找不到数据,或者连接选项无法启动。
有没有人有我可以参考的工作示例? Cheers Roy
你没有说你使用的是什么版本的spring cloud config(这是最近的一个功能)。 –