title: @Value for initializing java.util.Date in Spring 3
body: <p>I have a <code>Employee</code> class with a <code>java.util.Date</code> type member variable like this:</p>
  
  <pre><code>@Component(value="employeeBean")
  public class Employee {
  // How to initialize this using @Value ???
  private Date dateOfJoining;
  }
  </code></pre>
  
  <p>Using the <code>application context xml</code> this can be done using this:</p>
  
  <pre><code>&lt;bean id="dateFormat" class="java.text.SimpleDateFormat"&gt;
      &lt;constructor-arg value="yyyy-MM-dd" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="employeeBean" class="com.Employee"&gt;
      &lt;property name="dateOfJoining"&gt;
          &lt;bean factory-bean="dateFormat" factory-method="parse"&gt;
              &lt;constructor-arg value="2010-01-31" /&gt;
          &lt;/bean&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>But I want to do this using Annotations. Please advice.</p>