title: junit/spring properties not loading with application context
body: <p>While running a junit test, I cannot get the application context to load properties from external properties files.</p>
  
  <p>Given the following:</p>
  
  <p>TestClass  </p>
  
  <pre><code>@RunWith(SpringJUnit4ClassRunner.class)
  @ContextConfiguration(locations = "classpath:spring/app-config.xml")
  public class JdbcWatsonDaoTests {
  
      @Autowired
      JdbMyDao jdbcMyDao;
  
      @Before
      public void setUp() throws Exception {
      }
  
      @Test
      public void testMethod() {
          doSomeStuff();
      }
  }
  </code></pre>
  
  <p>app-config.xml  </p>
  
  <pre><code>&lt;util:properties id="aProperties" location="classpath:spring/a.properties" /&gt;
  &lt;util:properties id="bProperties" location="classpath:spring/b.properties" /&gt;
  
  &lt;bean id="oracleDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"&gt;
      &lt;property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/&gt;
      &lt;property name="url" value="${oracle.url}"/&gt;
      &lt;property name="username" value="${oracle.username}"/&gt;
      &lt;property name="password" value="${oracle.password}"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>and the a.properties and b.properties files are in the same location as app-config.xml...</p>
  
  <p>I've found that when running the test, the properties placeholders (the literal "${property}" )are what is being sent to the oracle server instead of the values in the properties files.</p>
  
  <p>I've also tried using a bean configuration using PropertyPlaceholderConfigurer instead of , but it still doesn't find/include properties.</p>
  
  <p>I am using eclipse helios, spring 3.0.5, newest release m2eclipse and 4.4 junit.  I had to downgrade junit for a different maven/junit bug.</p>
  
  <p>When published within tomcat, the properties are read and properly used.  I only see the problem when running a junit test.</p>