JSON parse error Cannot deserialize value of type javatimeLocalDateTime from String 2023-08-16 094551 Failed to deserialize javatimeLocalDateTime javatimeformatDateTimeParseException Text 2023-08-16 0
报错的原因是在将字符串"2023-08-16 09:45:51"转换为java.time.LocalDateTime类型时发生了错误。具体来说,解析器无法在索引10处解析字符串。
可能的原因是日期时间格式不符合java.time.LocalDateTime的要求。java.time.LocalDateTime的默认格式为"yyyy-MM-ddTHH:mm:ss",其中"T"表示日期和时间的分隔符。您提供的字符串中使用了空格作为分隔符,而不是"T"。
要解决此问题,您可以将字符串转换为符合java.time.LocalDateTime格式的字符串,然后再进行解析。例如,您可以将字符串"2023-08-16 09:45:51"转换为"2023-08-16T09:45:51",然后再进行解析。
另外,如果您使用的是Spring框架,可能还需要确保您的实体类和序列化/反序列化配置正确。您可以检查com.bonoon.manageprotect.domain.Sfd11类中sfd1113属性的注解和类型是否正确。
原文地址: https://www.cveoy.top/t/topic/iET7 著作权归作者所有。请勿转载和采集!