title: Access properties file programmatically with Spring?
body: <p>We use the code below to inject Spring beans with properties from a properties file.</p>
  
  <pre><code>&lt;bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;
      &lt;property name="locations" value="classpath:/my.properties"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="blah" class="abc"&gt;
      &lt;property name="path" value="${the.path}"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Is there a way we can access the properties programmatically?  I'm trying to do some code without dependency injection.  So I'd like to just have some code like this:</p>
  
  <pre><code>PropertyPlaceholderConfigurer props = new PropertyPlaceholderConfigurer();
  props.load("classpath:/my.properties");
  props.get("path");
  </code></pre>