JSON parse error: Cannot deserialize instance of `com.haha.phb.io.UserArrayIO
前言
最近开发新项目,接收前端提交的数组,报错
错误信息
{
"timestamp": "2020-11-26T12:28:21.713+0000",
"status": 400,
"error": "Bad Request",
"message": "JSON parse error: Cannot deserialize instance of `com.haha.phb.io.UserArrayIO` out of START_ARRAY token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `com.haha.phb.io.UserArrayIO` out of START_ARRAY token\n at [Source: (PushbackInputStream); line: 1, column: 1]",
"path": "/api/user/save"
}
请求参数
[
{
"loginUserId":null,
"userName":"张三",
"password":"123456",
"roleName":"操作员"
},{
"loginUserId":null,
"userName":"王五",
"password":"123456",
"roleName":"操作员"
}
]
后端接收
- 修改后端接收参数
重新启动项目:
还没有评论,来说两句吧...