org.springframework.http.converter.HttpMessageNotReadableException:
JSON parse error: Cannot deserialize value of type `java.util.Date` from String
"2024-03-27 14:11": expected format "yyyy-MM-dd HH:mm:ss"; nested exception is
com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize
value of type `java.util.Date` from String "2024-03-27 14:11": expected format
"yyyy-MM-dd HH:mm:ss"
报错原因:前端传递的值是2024-03-27 14:11这样的格式,但是后端接收的实体类对应属性上面@JsonFormat是@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")导致的报错
解决办法:改成和前端参数统一的格式即可