spring-cloud / spring-cloud-config

External configuration (server and client) for Spring Cloud
Apache License 2.0
1.97k stars 1.29k forks source link

Hierarchical configuration and property placeholders with jdbc backend #1277

Open nagesh-salunke opened 5 years ago

nagesh-salunke commented 5 years ago

Description:

Consider following configuration hierarchy which I have for my cloud config server:

I have the flexibility of having property placeholders and common configuration with the above hierarchy Example :

  1. application.properties : has common configuration across the microservices for all environments.
  2. application-dev.properties : has common configuration across microservices for dev environment.
  3. microservice-dev : has specific configuration for microservice for dev environment

In case of override of properties with same key the service specific values are resolved. Also it is possible to have placeholders to have values from other keys.

Question/Enhancement: Usually the searchPaths configuration in spring.cloud.config is used to do this when the backend is git. I would like to achieve the same thing using Jdbc backend, But seems like it is currently not possible. Is there a workaround or is this already in future scope ?

nagesh-salunke commented 5 years ago

I tried property placeholder with jdbc backend and that works fine.