title: property placeholder in class attribute of a bean
body: <p>A colleague of mine and I are playing around with the following spring configuration:</p>
  
  <pre><code>&lt;beans&gt;
     &lt;context:property-placeholder location='classpath:/configuration.properties'/&gt;
      &lt;bean id="myBean" class="${type}" /&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>We want to be able to provide a environment specific implementation of <code>myBean</code>. On a developers system the value of <code>type</code> would be a lightweight implementation of whatever <code>myBean</code> does. And in a production environment we would use a full-blown version.</p>
  
  <p>When my colleague runs the code, everything works. When I run the code, I get a <code>ClassNotFoundException</code>, because spring tries to instantiate <code>${type}.class</code>. And it is not like it sometimes works and sometimes does not. On my machine it always fails and on my colleagues machine it always works.</p>
  
  <p>Does anybody knows what the problem is?</p>
  
  <p>Thx in advance,
  Yevgeniy</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>as requested, here is how we load the application context:</p>
  
  <pre><code>ClassPathXmlApplicationContext("application-configuration.xml");
  </code></pre>
  
  <p>the content of the properties file is pretty simple:</p>
  
  <pre><code>type=foobar.TestServiceImpl
  </code></pre>