April 2018
Intermediate to advanced
432 pages
10h 38m
English
An application with Spring Cloud Consul Config library in the classpath fetches configuration from the Consul key/value store during the bootstrap phase. That is, by default, stored in the /config folder. When we are creating a new key first, we have to set a folder path. That path is then used for identifying the key and assigning it to the application. Spring Cloud Config tries to resolve properties stored in the folder based on the application name and active profiles. Assuming we have the spring.application.name property set to order-service in the bootstrap.yml file and the spring.profiles.active running argument set to zone1, it tries to locate the property sources in the following order: config/order-service,zone1/ ...