How to ask Spring Cloud Config server to checkout configuration from specific branch? How to ask Spring Cloud Config server to checkout configuration from specific branch? spring spring

How to ask Spring Cloud Config server to checkout configuration from specific branch?


According to the documentation, the configuration you want to set in your config client is:

spring.cloud.config.label=mybranch

Where mybranch is an existing branch in your git repo.


You can specify the default branch (more generally, Git label) that a config server uses if a client does not specify the label, via property spring.cloud.config.server.git.default-label, perhaps this is what you are after? Certainly solves the issue for me!


Config server designed to use profile to separate environment.Example:

/{application}/{profile}[/{label}]/{application}-{profile}.yml/{label}/{application}-{profile}.yml/{application}-{profile}.properties/{label}/{application}-{profile}.properties

The branching make configuration inconsistency.

Concept of config server is based on 12-factor config (http://12factor.net/config ) .

Check it out for detail reason.