do not register default formatters for Date and Calendar (requiring explicit use of @DateTimeFormat there)

This commit is contained in:
Juergen Hoeller
2009-12-03 23:26:08 +00:00
parent 73a75220a8
commit 0a36596468
3 changed files with 3 additions and 67 deletions

View File

@@ -111,9 +111,7 @@ public class JodaTimeFormattingConfigurer {
Printer<ReadableInstant> readableInstantPrinter = new ReadableInstantPrinter(jodaDateTimeFormatter);
formatterRegistry.addFormatterForFieldType(ReadableInstant.class, readableInstantPrinter, dateTimeParser);
formatterRegistry.addFormatterForFieldType(Calendar.class, readableInstantPrinter, dateTimeParser);
formatterRegistry.addFormatterForFieldType(Date.class, new MillisecondInstantPrinter(jodaDateTimeFormatter), dateTimeParser);
formatterRegistry.addFormatterForFieldAnnotation(new DateTimeFormatAnnotationFormatterFactory());
}