You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great to be able to support directory recursion and wildcards when defining additional config locations.
What I would like to be possible is to automatically scan all .properties files under a given directory found in the classpath/or under a filesystem path, as additional locations for configuration properties files.
ex: smallrye.config.locations=tenants/ (with tenants directory being in /resources/ of my project).
Currently we have to expicitely define the path of each .properties file under the directory : smallrye.config.locations=tenants/fr/authentication.properties,tenants/fr/datasources.properties,tenants/lu/authentication.properties,tenants/lu/datasources.properties
It works but can be problematic when you may later have a lot of additional tenants.
What I would like to be is be able to define directories for each tenant of my application, each directory containing the properties associated to this tenant.
Example :
Being able to use wildcards in the path would be also great
ex : smallrye.config.locations=tenants/*/*.properties
The text was updated successfully, but these errors were encountered:
omasseau
changed the title
Support for directory recursion and wildcards when defining config locations
Enhancement Request : Support for directory recursion and wildcards when defining config locations
Jul 18, 2024
Do you have a proposal about conflict resolution? Perhaps file iteration order would be significant, with later files overriding earlier files?
In my case the properties defined in the files will always have different names.
But maybe we could have a property to specify the priority to apply between conflicting files ?
ALWAYS_FAIL being the default -> If two files have the same property defined, an error is raised.
Right now, there is no restriction in defining the same property name in different files. In fact, this is how you can override configuration values. I think we shouldn't introduce something that behaves completely different.
In addition, there's a point you get to when you have meta-configuration for your configuration where having all the extra knobs and dials impacts usability by causing subtle problems that are hard to diagnose and debug. We generally want to have a single fixed set of rules whenever possible, so that questions have one answer and a given solution always works.
Hello,
It would be great to be able to support directory recursion and wildcards when defining additional config locations.
What I would like to be possible is to automatically scan all .properties files under a given directory found in the classpath/or under a filesystem path, as additional locations for configuration properties files.
ex:
smallrye.config.locations=tenants/
(with tenants directory being in /resources/ of my project).Currently we have to expicitely define the path of each .properties file under the directory :
smallrye.config.locations=tenants/fr/authentication.properties,tenants/fr/datasources.properties,tenants/lu/authentication.properties,tenants/lu/datasources.properties
It works but can be problematic when you may later have a lot of additional tenants.
What I would like to be is be able to define directories for each tenant of my application, each directory containing the properties associated to this tenant.
Example :
Being able to use wildcards in the path would be also great
ex :
smallrye.config.locations=tenants/*/*.properties
The text was updated successfully, but these errors were encountered: