首页 > 其他分享> > Cannot construct instance of `xxxxxxx` (no Creators, like default construct, exist)的解决方法
Cannot construct instance of `xxxxxxx` (no Creators, like default construct, exist)的解决方法
作者:互联网
用SpirngMVC|SpringBoot实现把表单数据转化成json字符串传递到Controller实现保存数据到数据库时遇到:Cannot construct instance of `xxxxxxx` (no Creators, like default construct, exist)异常
是由于xxxxxxx实体类中没有写无参构造方法
如:若实体类为
ConnectionVo.java
必须有无参的构造方法,否则在POST请求传入JSON.stringify(xxx)的json字符串数据,在Controller中用@RequestBody注解映射实体时就会报Cannot construct instance of `xxxxxxx` (no Creators, like default construct, exist)异常
标签:like,no,construct,xxxxxxx,instance,Cannot,exist 来源: https://www.cnblogs.com/jiewenk/p/16343000.html