[英]Organizing svn files in folder with spring cloud config
I have the following config for my spring cloud config(v 2.2.2 Release) server application.properties:我的spring cloud config(v 2.2.2 Release)服务器application.properties有以下配置:
spring.profiles.active=subversion
spring.cloud.config.server.svn.uri=http://192.dummy:8000/svnrepos/configuration
spring.cloud.config.server.svn.username=dummy
spring.cloud.config.server.svn.password=********
spring.cloud.config.server.svn.default-label=config
Currently it is loading the files from the following folder pattern:目前它正在从以下文件夹模式加载文件:
svn path: configuartion/config svn 路径:配置/配置
However since I will have many projects using the spring cloud config I want to create subfolders for each project to contains their respective files:但是,由于我将有许多项目使用 spring cloud 配置,我想为每个项目创建子文件夹以包含它们各自的文件:
For example:例如:
svn path: configuration/config svn 路径:配置/配置
projectA项目A
application.., application-dev, customProperties应用程序..,应用程序开发,自定义属性
projectB项目B
appProperties.. , application-dev, application-prod, customProperties appProperties.. , application-dev, application-prod, customProperties
projectC项目C
appProperties.., application-dev, application-prod, customProperties appProperties..、应用程序开发、应用程序产品、自定义属性
How can this be achieved please?请问如何实现?
By updating url, u need n
config-server for n
applications.通过更新 url,你需要n
n
应用程序的配置服务器。 Better keep config project wise and give pattern
in config-server configuration.更好地保持配置项目明智并在配置服务器配置中提供pattern
。
Configuratoin repo:配置回购:
svn path: configuration/config
ab-projectA
- ab-projectA.yml.., ab-projecB-dev.yml, ab-projectA-prod.yml
ab-projectB
- ab-projectB.yml.. , ab-projectB-dev.yml, ab-projectB-prod.yml
Config server configuration配置服务器配置
spring.profiles.active=subversion
spring.cloud.config.server.svn.uri=http://192.dummy:8000/svnrepos/configuration
spring.cloud.config.server.svn.username=dummy
spring.cloud.config.server.svn.password=********
spring.cloud.config.server.svn.default-label=config
spring.cloud.config.server.svn.search-paths=ab*
Now you can see properties application wise:现在您可以明智地看到属性应用程序:
http://host:port/context-path/{application-name}/{env}
http://host:port/context-path/ab-projectA/dev
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.