-
Notifications
You must be signed in to change notification settings - Fork 77
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
System/Environment variables #144
Conversation
…t variables. Fixes 114
WDYT @harawata? This is semi more relevant now with the Docker migrations. |
Hi @h3adache , Thanks for your work! Is your goal to omit .properties file completely? I was trying to implement it with a different approach. |
No the goal was to do something more like Apache configurations or TypeSafe config which allows for system and environment level overrides. I can see what you mean by conflicts although in my years of using those other config systems I have not yet encountered any when there are sensibly named variables. We can namespace it using MyBatis? I think that’s more simple and convenient then the longer namespace. How you have ${} would be really nice for use in SQL but if the config system already contains them then we don’t need that |
With your approach, namespace/prefix is practically mandatory because there is no good workaround once the conflict occurs. With my approach, OTOH, choosing variable name becomes a developer's responsibility. =D
Does this mean that you want to write some 'default' value in the .properties file and override it using environment variable? |
This is true. The config systems get around this by letting users decide what level or overrides they want to use as a configuration. We could do that as well.
I think this is directly related to what I said above about letting the overrides be configurable.
I think this is a good addition to your |
Okay. It might feel more natural to other users if it does to you. |
Don't merge this yet. Need tests
Add ability to define/override environment using system or environment variables.
Fixes 114