I need to create a dedicated config server for a list of microservices. Following is the snippet of application.yml of the config server:
server.port: 8888
management.security.enabled: false
spring:
cloud:
config:
server:
git:
uri: some github link
username: ENC(/YNsVqtbBwIOq+KlzzQrn6WZbg1tPxzn9V0BM=)
password: ENC(+jatkfs906vfPwqPxtkgBn3LeVGr)
search-paths:
- microcervices1
- microservices2
- microservices3
jasypt:
encryptor:
algorithm: some algorithm
password: Its password
I am facing problem in accessing those microservices configurations.
The documentation http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html#_spring_cloud_config_server mentions that wildcards {application}, {label}, {profile} can be used within the searchPaths variable so that "you can segregate the directories in the path"
It Would be a great help If anyone can help me out with this issue, Thanks!
It can be solved as following :
Suppose you have in your config repo properties for multimple services organized in folders: properties organized in folders
Then, your config file for config server looks like this :
This way you can organize all the properties in one central config repository and tell spring config server in which folders to look for properties