This chapter covers:
- Configuring Spring with properties and profiles
- Leveraging external configuration with Spring Boot
- Implementing a configuration server with Spring Cloud Config Server
- Configuring applications with Spring Cloud Config Client
In the previous chapter, you built a RESTful application for managing books in a public library, ran it in your local development environment, and finally pushed your changes to a remote repository. After that, you would probably package the application and deployed it to different environments, possibly in an automated way. For example, you would run it on a Continuous Integration (CI) server (as you did with GitHub Actions), on a Quality Assurance (QA) environment, on a staging environment, and finally in production. Depending on where it is deployed, the same application will have different needs and will most likely require a different configuration.
Note
Configuration is defined as everything likely to change between deployments, like credentials, resource handlers, and URLs to backing services.