Cannot deserialize value of type `java.time.LocalDateTime` from String “2022-08-17 00:38:14“: Failed
在实体中定义时间属性类型为LocalDateTime时,加上时间格式化注解即可。
·
Cannot deserialize value of type `java.time.LocalDateTime` from String "2022-08-17 00:38:14": Failed to deserialize java.time.LocalDateTime: (java.time.format.DateTimeParseException) Text '2022-08-17 00:38:14' could not be parsed at index 10
在实体中定义时间属性类型为LocalDateTime时,加上时间格式化注解即可
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
更多推荐
所有评论(0)