SSM的,日常错误

org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.imooc.oa.dao.EmployeeDao com.imooc.oa.biz.impl.ClaimVoucherBizImpl.employeeDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employeeDao' defined in file [H:\javaee开发\workspace\OA\oa_dao\target\classes\com\imooc\oa\dao\EmployeeDao.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property 'department'. It was either not specified and/or could not be found for the javaType (com.imooc.oa.entity.Department) : jdbcType (null) combination.




    这里有俩个错误 第一个是 数据库字段写成了 Deployee里面的属性  departmentSn  应该是 department_sn    第二个 #{department}   应该是 #{departmentSn}    departement 是关联的对象 所以不能单独写  可以写成 对象.属性 的 格式

猜你喜欢

转载自www.cnblogs.com/qinning/p/10371326.html
今日推荐