title: Spring MVC JSON serialization @JsonSerialize is ignored
body: <p>Using Spring Boot, Spring MVC and returning POJO with List. <code>Date</code> field is not serialized when field annotated with my custom JsonSerializer (@JsonSerialize(using = DateTimeSerializer.class)).</p>
  
  <p><strong><code>JsonSerializer.serialize</code> is not called.</strong></p>
  
  <p>How can I get this working - to force Jackson to call my custom Serializers?
  I can extend ObjectMapper and set something but so far nothing worked.</p>
  
  <p>I've tried to annotate getters but no success here.</p>
  
  <p>Using Spring 4, Jackson 2.4.4, included all jackson dependencies (databind, annotations, core). I've included Spring OXM as well.</p>
  
  <p>DateTimeSerializer class:</p>
  
  <pre><code>import java.io.IOException;
  import java.util.Date;
  
  import com.fasterxml.jackson.core.JsonGenerator;
  import com.fasterxml.jackson.core.JsonProcessingException;
  import com.fasterxml.jackson.databind.JsonSerializer;
  import com.fasterxml.jackson.databind.SerializerProvider;
  
  public class DateTimeSerializer extends JsonSerializer&lt;Date&gt; {
  
      @Override
      public void serialize(Date date, JsonGenerator gen, SerializerProvider provider) throws IOException, JsonProcessingException {
          gen.writeString(DateUtil.toCzechDateTime(date));
      }
  }
  </code></pre>
  
  <p>DateUtil.toCzechDateTime is my own method and works okay - returns a String which I want.</p>