org.springframework.http.converter.HttpMessageNotReadableException


org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize value of type `java.util.Date` from String "2019-12-16 06:11:08": not a valid representation (error: Failed to parse Date value '2019-12-16 06:11:08': Cannot parse date "2019-12-16 06:11:08": while it seems to fit format 'yyyy-MM-dd'T'HH:mm:ss.SSSZ', parsing fails (leniency? null));

对于出现这样的错误,说明是字符串转换成日期对象出错,实体类中的日期字段设置指定日期格式化的格式

检查传递的参数的字符串日期格式是否是上面设置的格式


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM