We have just learned how to create complex configurations using built-in converters and, for the most demanding, custom converters. What about if we need to switch between different configurations, for example, when moving from a development environment to a production one? Here, you can duplicate your configuration. However, the proliferation of configuration files is not always welcome in IT projects. Let's learn how to deal with this concern using configuration profiles.
In a nutshell, configuration profiles allow us to specify namespaces for our profiles in our configuration so that we can bind each property to a specific profile in the same file.
Out of the box, Quarkus ships with the following configuration profiles:
- dev: This is triggered when running in development mode (that is, quarkus:dev).
- test: This is triggered when running tests.
- prod...