MicroProfile Custom Configuration Sources
The MicroProfile Configuration Api provides built in support for reading configuration values from many places, such as environment variables or system properties.
Sometimes however, it can be useful to read properties from a file having different versions of the file for production, test and development, e.g. application-dev.properties
, application-prod.properties
or application-test.properties
.
In this video, David Salter shows how to configure MicroProfile to allow you to load configuration based upon an application profile (prod, test, dev etc.) in a similar way to how Spring Boot manages its application.properties
files.
In this example, the sample application is running on Apache TomEE.