Skip to Content
Mastering Spring Cloud
book

Mastering Spring Cloud

by Piotr Mińkowski
April 2018
Intermediate to advanced content levelIntermediate to advanced
432 pages
10h 38m
English
Packt Publishing
Content preview from Mastering Spring Cloud

Distributed configuration

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/ ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microservices with Spring Boot and Spring Cloud - Second Edition

Microservices with Spring Boot and Spring Cloud - Second Edition

Magnus Larsson

Publisher Resources

ISBN: 9781788475433Supplemental Content