1.报错信息:
java.sql.SQLException: Cannot create org.hbwl.dto.TbDept: org.hbwl.dto.TbDept.<init>() Query: select * from tb_dept Parameters: []
2.测试代码:
@Test
public void Test05() throws SQLException {
List<TbDept> tbDepts = deptDao.queryDeptAll();
System.out.println(tbDepts.size());
}
3.解决方法:
给返回的TbDept 实体类加上空构造器方法 。
public TbDept() {
}
测试成功