MyBatis动态代理查询出错

 org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: org.apache.ibatis.reflection.ReflectionException: Error instantiating class cn.ddf.bean.Student with invalid types () or values (). 
Cause: java.lang.NoSuchMethodException: cn.ddf.bean.Student.<init>()
### The error may exist in mapper/studentMapper.xml
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: select id,age,NAME from student
### Cause: org.apache.ibatis.reflection.ReflectionException: Error instantiating class cn.ddf.bean.Student with invalid types () or values ().
 Cause: java.lang.NoSuchMethodException: cn.ddf.bean.Student.<init>()

增删改没错,查询出错!

这是实体类中写了带参构造却没写无参构造方法!!

原文地址:https://www.cnblogs.com/areyouready/p/7527114.html