Consider this property in an Hibernate
-managed entity:
@JsonFormat(pattern = "HH:mm")
@Column(name = "start_time")
private java.sql.Time startTime;
I post a JSON
-object as @RequestBody
to a Spring Controller which Jackson
is supposed to map into an instance of the entity (pojo).
Jackson
does apparently not manage to de-serialize the time-string into a java.sql.Time
, because I am getting this Exception:
.w.s.m.s.DefaultHandlerExceptionResolver : Failed to read HTTP message:
org.springframework.http.converter.HttpMessageNotReadableException:
Could not read document: Can not construct instance of java.sql.Time,
problem: null
How can I instruct Jackson
to understand what to do?