title: Inject date using @Value annotation
body: <p>This is how I am trying to inject a date into a @Component class. </p>
  
  <pre><code>@Value("${new java.text.SimpleDateFormat(\"yyyyMMdd\").parse(\"${PROP_DATE}\")}")
  Date myDate;
  </code></pre>
  
  <p>The date is specified as a String in properties file :</p>
  
  <pre><code>PROP_DATE=20110421
  </code></pre>
  
  <p>I get this error. What am I doing wrong? Is there any other way to inject Date property? Thanks.</p>
  
  <pre><code>Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ccc': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: java.util.Date aaa.bbb.ccc.myDate; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'new java.text.SimpleDateFormat("yyyyMMdd").parse("20110421")'
  </code></pre>