"JSON parse error: Cannot construct instance of `com.baomidou.mybatisplus.extension.plugins.pagination.Page` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('10'); nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `com.baomidou.mybatisplus.extension.plugins.pagination.Page` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('10')\n at [Source: (org.springframework.util.StreamUtils$NonClosingInputStream); line: 2, column: 12] (through reference chain: eeb.afc.whkg.cc.vo.PettyCashRequestVO[\"page\"])",
时间: 2024-04-22 20:22:19 浏览: 123
这个错误的原因是您正在尝试将一个字符串值("10")反序列化为一个 `com.baomidou.mybatisplus.extension.plugins.pagination.Page` 对象,但是该类没有从字符串值构造实例的构造函数或工厂方法。
您需要检查您的代码,确定您正在正确地将要反序列化的对象的类型传递给反序列化方法。如果您确定您正在传递正确的类型,那么您需要检查该类的构造函数或工厂方法,确保它们可以从字符串值构造实例。
相关问题
Resolved [org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot construct instance of
Resolved [org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error Cannot construct instance of "com.example.User" (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('John Doe'); nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of "com.example.User" (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('John Doe')
阅读全文