title: Spring 3 doesn't fill @Value annotated fields with property values
body: <p>I want to fill some fields with the property values using Spring 3.1.1 but the fields always remain null.</p>
  
  <p>Added to the applicationContext.xml</p>
  
  <pre><code>  http://www.springframework.org/schema/util 
    http://www.springframework.org/schema/util/spring-util-3.0.xsd"&gt;
  
    &lt;util:properties id="props" location="classpath:application.properties" /&gt;
  </code></pre>
  
  <p>application.properties:</p>
  
  <pre><code>myProp=value
  </code></pre>
  
  <p>java class:</p>
  
  <pre><code>  @Value("#{props[myProp]}")
    private String myField;
  </code></pre>
  
  <p>But on bean creation myField is not filled with "value" from the properties file but remains null.</p>
  
  <p>Also tried (without success):</p>
  
  <pre><code>  @Value("#{props.myProp}")
    private String myField;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>  @Value("#{myProp}")
    private String myField;
  </code></pre>
  
  <p>The application.properties file is found because I got an "file not found" after I moved it.</p>
  
  <p>Here the stacktrace: <a href="http://pastebin.com/5A8i5gF8" rel="nofollow">http://pastebin.com/5A8i5gF8</a></p>
  
  <p>What do I have to change?</p>