title: Spring: external and internal properties files
body: <p>I have two Java applications which use Spring (one with v 2.5.4, the other with v 3.1.1.) and are deployed onto Weblogic.</p>
  
  <p>For each application, I'd like Spring to be able to utilise two separate property files - one in the server's filesystem and, if that does not exist for any reason, one included in the application's ear file as a set of "default" values.</p>
  
  <p>Can I specify such a thing using a "context:property-placeholder" entry in the application's applicationContext.xml file?</p>
  
  <p>I've had a look on the Net and not been able to find anything definitive... but could I do something like this, for example?</p>
  
  <pre><code>&lt;!-- Default values loaded first --&gt;
  &lt;context:property-placeholder location="classpath:myEarPropertiesFile.properties" /&gt;
  &lt;!-- Overridden values loaded next --&gt;
  &lt;context:property-override location="file:myExternalPropertiesFile.properties" /&gt;
  </code></pre>
  
  <p>Thanks in advance for any thoughts.</p>