title: @JsonFormat not working in nested object
body: <p>I have a very simple bean:</p>
  
  <pre><code>public class StatusBean {
  
   private String name;
   @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="MM-dd-yyyy")
   private Date startDate;
   @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="MM-dd-yyyy")
   private Date endDate;
  
   public String getName() {
      return name;
   }
   public void setName(String name) {
      this.name = name;
   }
   public Date getStartDate() {
      return startDate;
   }
   public void setStartDate(Date startDate) {
      this.startDate = startDate;
   }
   public Date getEndDate() {
      return endDate;
   }
   public void setEndDate(Date endDate) {
      this.endDate = endDate;
   }
  }
  </code></pre>
  
  <p>And I wrap it in another bean that I use to wrap objects for nice json formatting with messages and stuff:</p>
  
  <pre><code>public class ResponseBean {
  
  private boolean success = false;
  private String message;
  private Object data;
  
  public boolean isSuccess() {
      return success;
  }
  public void setSuccess(boolean success) {
      this.success = success;
  }
  public String getMessage() {
      return message;
  }
  public void setMessage(String message) {
      this.message = message;
  }
  public Object getData() {
      return data;
  }
  public void setData(Object data) {
      this.data = data;
  }
  }
  </code></pre>
  
  <p>In my controller, I set the Status bean inside the response bean with a setData();</p>
  
  <p>Spring serializes this out in JSON format,  however the output for the date is not formatting. I am getting the standard "yyyy-MM-DD" format. </p>
  
  <p>Am I doing something wrong?  How do I get this to work? </p>