-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Add prefix support for environment variables #3480
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
Conversation
@philwebb I didn't understand why the build failed. Looks like some error in Travis CI worker... Do you know what happened? |
I don't think that's what we had in mind. We shouldn't change the existing We thought of applying that constraint for binding so that not the full OS environment is available as it may actually break it (see the discussion on the original issue). My best guess is that that |
@snicoll Ok! I'll adjust the code to match the behavior you described. |
+ * for this application. | ||
+ * @param environmentPrefix the prefix | ||
+ */ | ||
public void setEnvironmentPrefix(String environmentPrefix) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snicoll I'm not sure if this is the best way to configure the environment prefix. I'd like some opinions on that.
@snicoll I believe that now it does what is is expected to do (considering the prefix only on binding). I made a line note about the way that the environment prefix is being configured. Because I'm not sure if it's a good idea using the system properties to do that. Need some opinions. |
5878dd5
to
479e829
Compare
14f483b
to
4e25623
Compare
@lucassaldanha this PR was automatically closed because you made it from master and your changes went away when you push force on your fork. If you still want to contribute this change, please create a PR from a branch and not master. Thanks. |
Creates an environmentPrefix property that is used to filter the
SystemEnvironmentPropertySource's map of environment
variables and create a new one only with the prefixed properties.
This new map is used on a new SystemEnvironmentPropertySource
that replaces the former one.
Fixes #3450