JSON parse error: Cannot construct instance of `xxx.xxx`

JSON parse error: Cannot construct instance of xxx.xxx (although at least one Creator exists): no int/Int-argument constructor/factory method to deserialize from Number value (1); nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of xxx.xxx (although at least one Creator exists): no int/Int-argument constructor/factory method to deserialize from Number value (1) at [Source: (PushbackInputStream); line: 1, column: 1]

点击前端编辑按钮之后,调起编辑弹窗的同时弹出此错误

解决:是前端直接传来id,后台却是userVo接参数的问题,将后台改为Long id作为形参即可。

你可能感兴趣的:(前后端问题,json)