org.apache.ibatis.executor.ExecutorException: No constructor found in xxxClass matching [java.lang.String, java.lang.Long, java.lang.String, java.lang.String, java.sql.Timestamp]
解决方案
为bean加上默认构造方法
public class User {
private String username;
private long id;
private String sex;
private String tel;
private Date createData;
//省略gettter and setter
public User(String username, long id, String sex, String tel, Date createData) {
this.username = username;
this.id = id;
this.sex = sex;
this.tel = tel;
this.createData = createData;
}
// 加上默认构造函数即可解决
public User(){};
}
"你的指尖,拥有改变世界的力量! "
欢迎关注我的个人博客:https://sugarat.top