feign的时间处理跟踪

引入feign后,时间处理反序列化会出现问题.

There was an unexpected error (type=Internal Server Error, status=500).
Error while extracting response for type [class cn.jk.contentcenter.domain.dto.user.UserDTO] and content type [application/json;charset=UTF-8]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize value of type `java.util.Date` from String "2020-07-07T16:58:15.000+0000": not a valid representation (error: Failed to parse Date value '2020-07-07T16:58:15.000+0000': Unparseable date: "2020-07-07T16:58:15.000+0000"); nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.util.Date` from String "2020-07-07T16:58:15.000+0000": not a valid representation (error: Failed to parse Date value '2020-07-07T16:58:15.000+0000': Unparseable date: "2020-07-07T16:58:15.000+0000") at [Source: (PushbackInputStream); line: 1, column: 86] (through reference chain: cn.jk.contentcenter.domain.dto.user.UserDTO["createTime"])
报错堆栈
在SynchronousMethodHandler调用

 

 

关键代码是DeserializationContext的parseDate方法,

 

 

https://blog.csdn.net/hpc_2015/article/details/97897660

 

 

 

posted @ 2020-07-12 14:43  wonkju  阅读(570)  评论(0编辑  收藏  举报