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
Command line properties not taking precedence over other property sources #167
Comments
If I'm not mistaken, this is the intended functionality. |
So given a spring-boot application running with cloud-config, the only option to overwrite a property in the default config file is to check in a profile to the config repo with the changed property in it and run with the profile? I can work with this, but seems like you should have the ability to change it from command line if needed (e.g., to quickly test a different server, but only for a short period of time). It would be great to understand why this is intended functionality. Thanks for your feedback and quick response. |
You can turn off the config server for a given instance, if you want, |
Not quite what I am looking for since I think this would require me to pass all properties in through command line then, I would like to just override one property but still use all other properties from config server (just like it would work with a properties file on the classpath). |
I had a similar issue. How I got around it was to provide an override in dialer.connection.port=${port:9125} Then I could actually override it by passing an argument: --port=9999 Sorry, cleaned up the copied reply as I had replied through email client instead of directly... |
Excellent suggestion, I will try this. Thanks! |
I am using spring-cloud-config-client 1.0.1.RELEASE and it is not taking command line properties over the property file in the cloud config server.
From the spring-boot docs on external configuration, it seems like this should always be the case:
http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-command-line-args
My current work around is to completely remove the property from my default and profile config files in the config repo, but it would be nice to have this option.
Is there a way to change the property source order? Or is this the intended functionality?
Thanks.
The text was updated successfully, but these errors were encountered: