标签:form sent jackson exc fas 问题:
org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error:Cannot deserialize value of type `java.util.Date` from String "2020-06-16": not a valid representation (error: Failed to parse Date value ‘2020-06-16‘: Unparseable date: "2020-06-16"); nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.util.Date` from String "2020-06-16": not a valid representation (error: Failed to parse Date value ‘2020-06-16‘: Unparseable date: "2020-06-16")
1)[email protected],前端传的格式是yyyy-MM-dd;
2)异常描述:反序列化失败,yyyy-MM-dd不是有效的格式。
[email protected],pattern格式要与前端一致。
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" , timezone = "GMT+8") private Date date;
问题:Cannot deserialize value of type `java.util.Date` from String "2020-06-16"
标签:form sent jackson exc fas 问题:
原文:https://www.cnblogs.com/Jimc/p/13141171.html