今天自己定制一个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中没有提供无参的构造函数,如下,加上如下标红的地方就可以了
今天自己定制一个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中没有提供无参的构造函数,如下,加上如下标红的地方就可以了