5 Controlling your configuration with Spring Cloud Configuration Server
This chapter covers
- Understanding importance of separating the service configuration from the service code
- Configuring a Spring Cloud configuration server
- Integrating a Spring Boot microservice with a Config server
- Encrypting sensitive properties
- Integrating the Spring Cloud configuration server with Hashicorp Vault
Since we started our career as software developers, we have always heard the importance of having the application configuration separated from the code. But what does that mean? In most scenarios, this means not having hard-coded values in the code. Forgetting this principle can make the process of making changes within an application more complicated. Why? Because every time a change to the configuration is made, the application has to be recompiled and/or redeployed. To avoid this, developers need to separate the configuration information from the application code completely. Doing this allows developers to make changes to configuration without going through a recompile process, but also it introduces complexity because now developers have another artifact that needs to be managed and deployed with the application.