一、问题描述
JSON parse error:
Cannot deserialize value of type `java.util.Date` from String "2022-05-30T16:00:00.000Z":
not a valid representation (error: Failed to parse Date value '2022-05-30T16:00:00.000Z':
Unparseable date: "2022-05-30T16:00:00.000Z");
nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException:
Cannot deserialize value of type `java.util.Date` from String "2022-05-30T16:00:00.000Z": not a valid representation
(error: Failed to parse Date value '2022-05-30T16:00:00.000Z': Unparseable date: "2022-05-30T16:00:00.000Z")
at [Source: (PushbackInputStream); line: 1, column: 28]
(through reference chain: org.springblade.modules.demo.entity.Blog["releaseTime"])
二、查看一下前端发的是什么
这里的时间格式不对
三、解决方案
加上格式化的注解
{
label: "发布时间",
prop: "releaseTime",
type:"date",
format:'yyyy-MM-dd HH:mm:ss',
valueFormat:'yyyy-MM-dd HH:mm:ss',
span:24,
rules: [{
required: true,
message: "请输入发布时间",
trigger: "blur"
}]
},
添加成功