In cases where the enterprise is already using a particular configuration system, custom written or off the shelf, Spring Boot provides us with a facility to integrate this into the application via the creation of a custom PropertySource implementation.
Adding a custom PropertySource to the environment using EnvironmentPostProcessor
How to do it...
Let's imagine that we have an existing configuration setup that uses a popular Apache Commons Configuration framework and stores the configuration data in XML files:
- To mimic our supposed pre-existing configuration system, add the following content to the dependencies section in the build.gradle file:
dependencies { ... compile project(':db-count-starter'...