1.报错信息:
java.time.DateTimeException: Unable to obtain Instant from TemporalAccessor: {},ISO resolved to 2022-02-15T07:28:26.524 of type java.time.format.Parsed
2.实体类:
@ApiModelProperty(notes = "创建时间", required = true)
@TableField(value = "create_time")
@Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second_millis, pattern = "yyyy-MM-dd HH:mm:ss:SSS")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss:SSS")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss:SSS", shape = JsonFormat.Shape.STRING, timezone = "GMT+8")
private Date createTime;
3.ES依赖坐标:
org.springframework.boot
spring-boot-starter-data-elasticsearch
2.3.2.RELEASE
4.解决办法:更换ES依赖坐标为:
org.springframework.data spring-data-elasticsearch 4.2.0



