Organizing svn files in folder with spring cloud config

user1999453 :

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

  1. application-dev
  2. application-prod
  3. 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

  1. projectA

    application.., application-dev, customProperties

  2. projectB

    appProperties.. , application-dev, application-prod, customProperties

  3. projectC

    appProperties.., application-dev, application-prod, customProperties

How can this be achieved please?

Golam Mazid sajib :

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

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=379333&siteId=1