1 date conversion problem
1. Error reporting
error: Failed to parse Date value '2021-09-13 23:59:59': Cannot parse date "2021-09-13 23:59:59": while it seems to fit format 'yyyy-MM-dd'T'HH:mm:ss.SSSZ', parsing fails (leniency?null))
2. solution
Add the annotation of date format deserialization on the field attribute @ jsonformat (pattern = "yyyy MM DD HH: mm: SS")
/**
* the end of time
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date endDate;
Read More:
- [Solved] SpringBoot Date Convert Error: JSON parse error: Cannot deserialize value of type `java.time.LocalDateTime`
- OpenFeign Error: {“code“:1,“msg“:“JSON parse error: Illegal character ((CTRL-CHAR, code 31))
- [Solved] Failed to convert value of type ‘java.lang.String‘ to required type ‘java.util.Date‘;
- [How to Solve Error]java.util.Date cannot be cast to java.sql.Date
- The problem of date format conversion between springboot and front end
- [Solved] org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class
- SpringCloud Use openFeign Multipartfile to Upload Files Error: Current request is not a multipart request
- How to Remove “Devtools failed to parse sourcemap” Warning
- Split log by date in log4j2 of spring boot
- [Solved] MultipartException: Failed to parse multipart servlet request; nested exception is java.lang.Runtime
- [Fixed] Disgusting bug Error:Failed to Load project configuration: cannot parse filemessage: content is not allowed in the preface.
- [Solved] HttpMessageNotReadableException: JSON parse error: Unrecognized field “xxxx“
- org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deseria
- JSON parse error: invalid UTF-8 solution series [How to Solve]
- TomcatJSON parse error: Invalid UTF-8 [How to Solve]
- [Solved] JSON parse error: Cannot construct instance of
- [Solved] org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot
- RSA Decryption Error: java.security.InvalidKeyException: IOException : algid parse error, not a sequence
- [Solved] JSON parse error: Cannot deserialize instance of `java.util.ArrayList<..> out of START_OBJECT token;
- [Solved] springsecurity custom exceptions: Error: Parse Error: Response overflow