title: Injecting values into spring using command line arguments
body: <p>I have an application which needs to run twice with different port numbers, is there a way that I can pass the port number as command line arguments and retrieve them in the spring context file.</p>
  
  <pre><code> &lt;bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"&gt;
      &lt;property name="brokerURL"&gt;
         &lt;value&gt;vm://localhost:${&lt;i&gt;port number goes here&lt;/i&gt;}&lt;/value&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>