— The error occurred in com/jxc/dao/impl/maps/T_report.xml.
— The error occurred while applying a result map.
— Check the T_report.selectT_reportAll-AutoResultMap.
— The error happened while setting a property on the result object.
— Cause: net.sf.cglib.beans.BulkBeanException; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
— The error occurred in com/jxc/dao/impl/maps/T_report.xml.
— The error occurred while applying a result map.
— Check the T_report.selectT_reportAll-AutoResultMap.
— The error happened while setting a property on the result object.
— Cause: net.sf.cglib.beans.BulkBeanException
- 在自动注入属性值的时候,发生异常;
- 返回的是null,但接收的属性不能接收空值,可以接收的是0;
- 判断出来bean属性里面应该是个基本类型,需要修改为包装类型
- int --> Integer
另一种解决办法是:
但是还有另一种解决办法,是网上查到的,说po类 缺空参构造。但是实际上我有空参构造,并不能解决问题,
更改了数据库的结构,可以逐一排查。
还有一种是get/set 方法,去看看po类是不是有缺少这两种方法的参数