I have the following config for my spring cloud config(v 2.2.2 Release) server 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
- application-dev
- application-prod
- application-test
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:
For example:
svn path: configuration/config
projectA
application.., application-dev, customProperties
projectB
appProperties.. , application-dev, application-prod, customProperties
projectC
appProperties.., application-dev, application-prod, customProperties
How can this be achieved please?
By updating url, u need n
config-server for n
applications. Better keep config project wise and give pattern
in config-server configuration.
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