Chapter 3. Controlling your configuration with Spring Cloud configuration server
This chapter covers
- Separating service configuration from service code
- Configuring a Spring Cloud configuration server
- Integrating a Spring Boot microservice
- Encrypting sensitive properties
At one point or another, a developer will be forced to separate configuration information from their code. After all, it has been drilled into their heads since school that they shouldn’t hard-code values into the application code. Many developers will use a constants class file in their application to help centralize all their configuration in one place. Application configuration data written directly into the code is often problematic because every time a change to the configuration has to be made the application has to be recompiled and/or redeployed. To avoid this, developers will separate the configuration information from the application code completely. This makes it easy to make changes to configuration without going through a recompile process, but also introduces complexity because you now have another artifact that needs to be managed and deployed with the application.