08-02-2023, 07:07 AM
I have an `application.properties` file that looks like this:
mcl.sso.frontend-url=http://blah.com:9001
mcl.sso.mocking-agent=false
I am trying to override these two variables from the command line. This should be possible by setting environment variables. Here's how I'm running the command:
MCL_SSO_FRONTEND_URL='foobar' MCL_SSO_MOCKING_AGENT='true' ./gradlew run
However, when I print out the values of these variables, `mcl.sso.mocking-agent` equals "true" (as expected), but `mcl.sso.frontend-url` still equals "http://blah.com:9001" (unexpected). Why doesn't `mcl.sso.frontend-url` change the value of the property? I can only assume this has something to do with the way Spring converts environment variables into property keys, but I can't find any specific documentation on this.
mcl.sso.frontend-url=http://blah.com:9001
mcl.sso.mocking-agent=false
I am trying to override these two variables from the command line. This should be possible by setting environment variables. Here's how I'm running the command:
MCL_SSO_FRONTEND_URL='foobar' MCL_SSO_MOCKING_AGENT='true' ./gradlew run
However, when I print out the values of these variables, `mcl.sso.mocking-agent` equals "true" (as expected), but `mcl.sso.frontend-url` still equals "http://blah.com:9001" (unexpected). Why doesn't `mcl.sso.frontend-url` change the value of the property? I can only assume this has something to do with the way Spring converts environment variables into property keys, but I can't find any specific documentation on this.