failed to parse field [showTime] of type [date] in document with id '11111'. Preview of field's value: '{dayOfWeek=WEDNESDAY, month=JUNE, hour=13, dayOfMonth=14, dayOfYear=165, year=2023, monthValue=6, nano=0, chronology={calendarType=iso8601, id=ISO}, minute=0, second=0}'
在写入ES的实体 上找到该字段 加上以下注解 即可解决。若不知道其含义,请自行百度。
@JsonSerialize(using = LocalDateTimeSerializer.class)
@JsonDeserialize(using = LocalDateTimeDeserializer.class)
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("座位号")
private String seatNumber;
@ApiModelProperty(value = "演出时间")
@Field(type = FieldType.Date, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss")
@JsonSerialize(using = LocalDateTimeSerializer.class)
@JsonDeserialize(using = LocalDateTimeDeserializer.class)
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime showTime;