Description:
Spring does not convert using @DateTimeFormat
, I try to send start
both ways below and it returns me a 404
. When I send the object without this field it creates the normal object, but it can not create when I request
with the start
field.
First try
'@DateTimeFormat(pattern = "HH:mm")
@Type(type="org.jadira.usertype.dateandtime.joda.PersistentLocalTimeAsString")
LocalTime start'
Second attempt
'@Type(type="org.jadira.usertype.dateandtime.joda.PersistentLocalTimeAsString")
@DateTimeFormat(pattern = "MM/dd/yyyy")
private DateTime start;'
Spring documentation:
'Use @DateTimeFormat to format
java.util.Date, java.util.Calendar, java.util.Long, or Joda Time fields.'