title: Read property file outside war using spring
body: <p><code>enter code here</code>I have a property file placed in the etc folder. "myapplication.properties" and few other property files in each sub module.. i am try to do the following </p>
  
  <pre><code>&lt;bean class="org.springframework.web.context.support.ServletContextPropertyPlaceholderConfigurer"&gt;
      &lt;property name="searchContextAttributes" value="true"/&gt;
      &lt;property name="contextOverride" value="true"/&gt;
      &lt;property name="ignoreResourceNotFound" value="true"/&gt;
      &lt;property name="locations"&gt;
          &lt;list&gt;
              &lt;value&gt;classpath:application.properties&lt;/value&gt; 
              &lt;value&gt;${config}&lt;/value&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;
      &lt;property name="ignoreUnresolvablePlaceholders" value="true"/&gt;
  &lt;/bean&gt; 
  </code></pre>
  
  <p>I am trying to do <strong>mvn -Dconfig=~/my.properties jetty:run</strong></p>
  
  <p>The properties are read from application.properties but not for config..</p>
  
  <p>While running application i get the ${jdbc.url} not correct .. This url is present in my.properties ..
  How can this be achieved ?</p>
  
  <p>Thanks</p>