美文网首页
fegin Google GSON GsonBuilder().

fegin Google GSON GsonBuilder().

作者: 码二哥 | 来源:发表于2020-05-05 08:43 被阅读0次

参考博客:
https://blog.csdn.net/AJian759447583/article/details/8216956?utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-1&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-1

1、报错如下

{"timestamp":"2020-05-05T00:37:06.600+0000","status":400,"error":"Bad Request","message":"JSON parse error: Cannot deserialize value of type java.util.Date from String "2020-05-05 08:37:06": not a valid representation (error: Failed to parse Date value '2020-05-05 08:37:06': Cannot parse date "2020-05-05 08:37:06": while it seems to fit format 'yyyy-MM-dd'T'HH:mm:ss.SSSZ', parsing fails (leniency? null)); nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type java.util.Date from String "2020-05-05 08:37:06": not a valid representation (error: Failed to parse Date value '2020-05-05 08:37:06': Cannot parse date "2020-05-05 08:37:06": while it seems to fit format 'yyyy-MM-dd'T'HH:mm:ss.SSSZ', parsing fails (leniency? null))\n at [Source: (PushbackInputStream); line: 7, column: 17] (through reference chain: cetc15.image.entity.SvcDepConf["createTime"])","path":"/image-db/svc-dep-conf/"}

使用的是fegin,


image

2、解决措施

image

3、适配器方式

image
image

相关文章

网友评论

      本文标题:fegin Google GSON GsonBuilder().

      本文链接:https://www.haomeiwen.com/subject/tcppghtx.html