【发布时间】:2020-01-01 15:54:57
【问题描述】:
我已经浏览了链接:JSON parse error: Can not construct instance of java.time.LocalDate: no String-argument constructor/factory method to deserialize from String value,但出现以下错误。
错误:
com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `java.time.Instant` (no Creators, like default construct, exist): no String-argument constructor/factory method to deserialize from String value ('2019-08-28T15:15:44.183Z')
Java
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class StudentResponse {
private Integer a;
private String b;
private String c;
private String d;
private String e;
private Instant lastUpdateDate;
}
【问题讨论】: