eclipse / microprofile-config

MicroProfile Configuration Feature
Apache License 2.0
213 stars 115 forks source link

read prefixed properties into Properties/Map #759

Open guykatz opened 2 years ago

guykatz commented 2 years ago

in a recent youtube vid (quarkus insights 103) concentrating on debezium. a live code demo held there with usage of MP config demonstrated a missing use case from the specification (it was a side effect of the demo not a purpose) generally speaking, at times, when dealing with property files config sources (and maybe other config source too), having prefixed properties, while NOT knowing in advance the amount of prefixed properties or their names, there is a need to read these properties 'blindly' into a Properties like object.

as an application developer, I want to be able to inject prefixed properties into Map/Properties Object @ConfigProperties(prefix = "server") Properties props;

...which enables me to:

read all preperties with a prefix (e.g: 'server') and using the props object and a configuration to another object or anyway I choose to.

link to the specific time where the bebezium presenter had to write explicit MP Config code programatic to achieve a work around can be found here: https://youtu.be/MQR1SLJVpgM?t=1335