JackSon将json串转成List<Object>,异常com.fasterxml.jackson.databind.JsonMappingException

来源:互联网 发布:访问网站出现 php探针 编辑:程序博客网 时间:2024/05/17 19:58

异常具体信息:

com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class com.oliver.bean.User]: can not instantiate from JSON object (need to add/enable type information?)


原因:

User类自定义了带参构造方法


解决:

加入无参构造方法即可

阅读全文
0 0