Unable to parse date value '2022-12-16T10:55:22.000Z' of property 'UserSign.signDate' with configured converters

Why can't the name attribute be mapped to the data in elasticsearch without adding it, but a date conversion error will occur after adding it???

@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@Field(name = "sign_date", type = FieldType.Date, format = DateFormat.basic_date_time, pattern = "yyyy-MM-dd HH:mm:ss")
private Date signDate;

this is my test

@Test
public void MyTest10() {
// Optional byId = myRepository.findById(185L);

    List<UserSign> userSignByUserId = myRepository.findUserSignByUserId(1L);
    for (UserSign u:userSignByUserId) {
        log.info("u ==> {}", u);
    }
}

This is error feedback
org.springframework.data.elasticsearch.core.convert.ConversionException: Unable to parse date value '2022-12-16T10:55:22.000Z' of property 'UserSign.signDate' with configured converters

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.