一、该问题的重现步骤是什么?
1. 不能反序列化了,Cannot deserialize value of type `java.util.Date` from String "2018-08-08 10:00:00"
nacos上blade.yaml 也配置了如下设置,但是所有feign调用时日期都不能反序列化。
#jackson配置
jackson:
#null自动转空值
null-to-empty: true
#大数字自动转字符串
big-num-to-string: true
#支持text文本请求,与报文加密同时开启
support-text-plain: false
date-format: yyyy-MM-dd HH:mm:ss
二、你期待的结果是什么?实际看到的又是什么?
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
四、请提供详细的错误堆栈信息,这很重要。
BladeFeignFallback:[org.springblade.system.user.feign.IUserClient.userInfoById] serviceId:[blade-user] message:[Error while extracting response for type [org.springblade.core.tool.api.R<org.springblade.system.user.entity.User>] 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 "2018-08-08 10:00:00": not a valid representation (error: Failed to parse Date value '2018-08-08 10:00:00': Cannot parse date "2018-08-08 10:00:00": while it seems to fit format 'yyyy-MM-dd'T'HH:mm:ss.SSSX', parsing fails (leniency? null)); nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.util.Date` from String "2018-08-08 10:00:00": not a valid representation (error: Failed to parse Date value '2018-08-08 10:00:00': Cannot parse date "2018-08-08 10:00:00": while it seems to fit format 'yyyy-MM-dd'T'HH:mm:ss.SSSX', parsing fails (leniency? null))
at [Source: (PushbackInputStream); line: 1, column: 560] (through reference chain: org.springblade.core.tool.api.R["data"]->org.springblade.system.user.entity.User["birthday"])]
五、若有更多详细信息,请在下面提供。
扫一扫访问 Blade技术社区 移动端