title: Spring property placeholder not working
body: <p>I've read similar issues on the stackoverflow.com, but none of the solutions helped me.
  The following configuration I use (maven project structure):
  the <code>src/main/resources/properties/app.properties</code> file</p>
  
  <pre><code>#possible values: dev test prod
  mode: dev
  </code></pre>
  
  <p>In the Spring configuration:</p>
  
  <pre><code>&lt;context:property-placeholder location="classpath:properties/app.properties"/&gt;
  &lt;import resource="classpath:/spring/db/${mode}-datasource-config.xml"/&gt;
  </code></pre>
  
  <p>Based on the value of <code>${mode}</code> I want to import the corresponding datasource configuration file.</p>
  
  <p>When I run the embedded tomcat7 using the <code>mvn clean install tomcat7:run</code> command I'm getting the error:</p>
  
  <pre><code>10, 2013 5:52:29 PM org.apache.catalina.core.StandardContext loadOnStartup
  SEVERE: Servlet /SpringWebFlow threw load() exception
  java.lang.IllegalArgumentException: Could not resolve placeholder 'mode' in string value "classpath:/spring/db/${mode}-datasource-config.xml"
  </code></pre>
  
  <p>The <code>target/classes/properties/app.properties</code> file exists.</p>
  
  <p>I'm using IntelliJ IDEA and in the editor I can click on the "${mode}" in <code>&lt;import resource="classpath:/spring/db/${mode}-datasource-config.xml"/&gt;</code> and see its value in the property file. Also the editor itself change <code>${mode}</code> onto the grey colored <code>dev</code> showing it can recognize the property value. In the editor I see: <code>&lt;import resource="classpath:/spring/db/dev-datasource-config.xml"/&gt;</code></p>
  
  <p>Any ideas why I'm getting the error and how it can be resolved?</p>