title: Jackson can't deserialize Date
body: <p>In my application I added REST. To test these methods I created some basic rows in my database.</p>
  
  <p>When I try to use GET with an ID to get a specific row in my database I get the jackson exception.</p>
  
  <pre><code>com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.util.Date` from String "2019-03-11T10:14:14Z[UTC]": not a valid representation (error: Failed to parse Date value '2019-03-11T10:14:14Z[UTC]': Cannot parse date "2019-03-11T10:14:14Z[UTC]": while it seems to fit format 'yyyy-MM-dd'T'HH:mm:ss.SSSZ', parsing fails (leniency? null))
  </code></pre>
  
  <p>My object that I try to make has a field</p>
  
  <pre><code>@Temporal(javax.persistence.TemporalType.TIMESTAMP)
  private Date published;
  </code></pre>
  
  <p>And the constructor that gets called is</p>
  
  <pre><code>public something(Date published) {
      this.published = published;
  }
  </code></pre>
  
  <p>I read in a StackOverflow question I should add the</p>
  
  <pre><code>@JsonType(pattern="")
  </code></pre>
  
  <p>above the field 'Published' but I can't seem to find what I need to import to get that annotation to work.</p>
  
  <p>EDIT:
  Thanks to the answer from SHAHAKASH I managed to add the annotation after all.</p>
  
  <pre><code>@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = TimeZone.getDefault(), locale = Locale.getDefault())
  </code></pre>
  
  <p>However I'm having two issues with this, one is that it won't allow me to keep the timezone and the locale. So removing those lets my program run</p>
  
  <pre><code>@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS")
  </code></pre>
  
  <p>Which gives me the error:</p>
  
  <pre><code>Cannot deserialize value of type `java.util.Date` from String "2019-03-11T10:14:14Z[UTC]": expected format "yyyy-MM-dd'T'HH:mm:ss.SSS"
  </code></pre>
  
  <p>Obviously meaning my format is wrong. I'm having lots of troubles to find the correct format of my Date.</p>