title: Overriding spring config server configuration from command line
body: <p>I have a spring config server running on localhost on port 8888. Here's a snippet from the relevant properties file:</p>
  <pre><code>server.port=8085
  ideal.connection.threshold.millis=600000
  listener.port=3042
  number.of.backlog.ports=1000
  </code></pre>
  <p>I am trying to override these properties from command line. I have tried -- and the -D variations, both before and after the &lt;application_name&gt;.jar, but to no avail. The application still picks up the properties from the spring config server.</p>
  <p>Things I've tried</p>
  <pre><code>java -Dspring.profiles.active=&lt;profile_name&gt; -Dlistener.port=3034 -Dserver.port=9096-Xmx2048m -jar listener-0.0.1-SNAPSHOT.jar 
  java -Dspring.profiles.active=&lt;profile_name&gt; --listener.port=3034 --server.port=9096-Xmx2048m -jar listener-0.0.1-SNAPSHOT.jar 
  java -Dspring.profiles.active=&lt;profile_name&gt; -Xmx2048m -jar listener-0.0.1-SNAPSHOT.jar --listener.port=3034 --server.port=9096
  java -Dspring.profiles.active=&lt;profile_name&gt; -Xmx2048m -jar listener-0.0.1-SNAPSHOT.jar -Dlistener.port=3034 -Dserver.port=9096
  </code></pre>
  <p>None of the above approaches work, in fact the second approach results in</p>
  <pre><code>Unrecognized option: --listener.port=3034
  </code></pre>
  <p>as it should. The other 3 options result in the config being picked up from the spring-config server.</p>
  <p>So my question is, is there a way to override the spring config server at all, and if so, what is the right way to override the configurations in the spring config server?</p>