title: Spring @ResponseBody Jackson JsonSerializer with JodaTime
body: <p>I have below Serializer for JodaTime handling:</p>
  
  <pre><code>public class JodaDateTimeJsonSerializer extends JsonSerializer&lt;DateTime&gt; {
  
      private static final String dateFormat = ("MM/dd/yyyy");
  
      @Override
      public void serialize(DateTime date, JsonGenerator gen, SerializerProvider provider)
              throws IOException, JsonProcessingException {
  
          String formattedDate = DateTimeFormat.forPattern(dateFormat).print(date);
  
          gen.writeString(formattedDate);
      }
  
  }
  </code></pre>
  
  <p>Then, on each model objects, I do this:</p>
  
  <pre><code>@JsonSerialize(using=JodaDateTimeJsonSerializer.class )
  public DateTime getEffectiveDate() {
      return effectiveDate;
  }
  </code></pre>
  
  <p>With above settings, <code>@ResponseBody</code> and Jackson Mapper sure works. However, I don't like the idea where I keep writing <code>@JsonSerialize</code>. What I need is a solution without the <code>@JsonSerialize</code> on model objects. Is it possible to write this configuration somewhere in spring xml as a one configuration?</p>
  
  <p>Appreciate your help.</p>