-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to decorate ConfigSources #66
Comments
This is actually quite difficult to do in the higher level APIs, because in the end, it's possible to query the |
Here are some example use cases:
|
@dmlloyd I'm not sure how much you're following microprofile-config development but we are working on the next release to address some of these issues:
they are tracked by eclipse/microprofile-config#392 We do not have use case for |
Sure. Imagine you have a platform where you might want to have one configuration file with multiple "profiles". I might have most of my keys be the same, but a small number might have some variations, for example: app.db.url=pgsql:...some production DB...
%dev.app.db.url=h2:...something trivial... Then I start up my app in a mode where all |
As for the other use cases, this might be a handy way to implement them. I've already got property expansion working locally (I wasn't going to bother upstreaming it because it definitely violates the current spec, but this can be revisited). Snapshot/caching aren't something I need right now but they seem like fairly obvious applications of the mechanism; good to hear these behaviors are going upstream. |
Does the there is a proposed mechanism similar to your profile: https://github.com/eclipse/microprofile-config/pull/392/files#diff-f61262f6aeaf46e63969779a53065af8R111 It's using suffixes instead of prefixes but the idea is the same and allows to specify configuration per project stages (or envs):
The code would have to specified these:
if |
I've just copied the convention used by Play. Plain suffixes are not a good idea though because there is a grammatical ambiguity. |
I'll comment such on the proposal. |
[#66] Add ability to wrap configuration sources (with tests)
Solved by #68. |
It would be nice if there were some way to install global
Converter
decorators/interceptors (e.g.UnaryOperator<Converter>
) which can enhance the conversion process.This would enable an easy way to plug in various variable expansion capabilities.
I'll work up a possible implementation.
The text was updated successfully, but these errors were encountered: