avaje / avaje-config

Application configuration / properties loading for JVM applications
https://avaje.io/config
Apache License 2.0
47 stars 7 forks source link

Fix where load by props or command line args or indirection does not load FILE if RESOURCE found #85

Closed rbygrave closed 1 year ago

rbygrave commented 1 year ago

These 3 load options call through to loadWithExtensionCheck() and that was NOT going to load FILE if the RESOURCE had been found. Generally this is not an issue as these load options generally are not used with BOTH a RESOURCE and FILE properties source.

However, this changes loadWithExtensionCheck() such that it will always try to load FILE source even if a RESOURCE source was found. The thinking here is that FILE source is externally configured and when provided is expected to override any default properties defined in RESOURCE sources which come with the application - in this sense it means config should always load a FILE source if there is one.