spring-cloud / spring-cloud-config

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

Use 'spring.cloud.config.server.default-profile' property for GIT and Vault backend as a default #1683

Open sentinalll opened 4 years ago

sentinalll commented 4 years ago

Is your feature request related to a problem? Please describe. We want to use spring cloud config server as a part of our application with Git and Vault backends. Our idea is to configure the default profile and label on config server level and allow clients to skip this parameters in the request. It is possible to set spring.cloud.config.server.git.default-label in config server which will be used if there will be no label in the client request. Also, there is a property spring.cloud.config.server.default-profile with javadoc "Default application profile when incoming requests do not have a specific one." that I expect will do a similar thing for profile. But this property ignored when a client tries to request configuration from config server without a profile in a request.

Describe the solution you'd like Use spring.cloud.config.server.default-profile property value for GIT and Vault backend as a default profile if there is no profile (spring.cloud.config.profile) property in a client request.

Describe alternatives you've considered Send profile(spring.cloud.config.profile) as a part of the client request

Additional context

spencergibb commented 4 years ago

we'll see if there is more demand for this.