title: Spring - @Value returns null
body: <p>I have a properties file under <em>/src/main/resources/</em> and I want to load data from it using Spring.</p>
  
  <p>In my Spring-context.xml I have this :</p>
  
  <pre><code>&lt;context:property-placeholder location="classpath:UserUtil.properties" /&gt;
  </code></pre>
  
  <p>and also have <code>&lt;context:component-scan base-package="com.myApp" /&gt;</code></p>
  
  <p>and in my class I load it like :</p>
  
  <pre><code>@Value("${injectMeThis}")
  private String injectMeThis;
  </code></pre>
  
  <p>but the value is always null</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>to check if the value, I use this : </p>
  
  <pre><code>System.out.println(new myClass().getInjectMeThis());
  </code></pre>