Added support for multiple file configuration sources #154
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Enabled usage of multiple file configuration sources. For example now you can define both config.yml and META-INF/microprofile-config.properties at the same time.
Also additional custom file configuration sources can be defined. For example:
config.yml:
config.prod.yml:
config.docker.yml:
The property
example-value
will be456
(additional config files override the default configuration files).Ordinals
The default configuration files will have an ordinal of
100
(101
,102
, ... if more than one are present).Additional configuration files will have an ordinal one higher than the highest ordinal of the default configuration files. If more than one additional configuration files are defined the one with the smallest index will have the highest ordinal.
In the example above, the config.yml will have an ordinal of
100
(lowest priority), the config.docker.yml will have an ordinal of101
and the config.prod.yml will have an ordinal of102
(highest priority).Of course, every ordinal can be manually set by defining the
config_ordinal
property in the configuration source (as per MicroProfile Config specification). For example:config.docker.yml: