Json转对象失败:"No suitable constructor found for type [simple type, class com.test.faster.domain.respons

来源:互联网 发布:java程序设计基础 编辑:程序博客网 时间:2024/05/26 02:21

今天自己定制一个json转换对象的方法,转换过程中报错:

"No suitable constructor found for type [simple type, class com.test.faster.domain.response.User]: can not instantiate from JSON object (need to add/enable type information?)


原因java bean中没有提供无参的构造函数,如下,加上如下标红的地方就可以了



0 0
原创粉丝点击