1.No constructor find in...错误
org.apache.ibatis.executor.ExecutorException: No constructor found in (....)
Users类代码如下:
public class User {
private Integer userId;
private String userName;
private String password;
private String name;
private String sex;
private String email;
public User(Integer userId, String userName, String password, String name, String sex, String email, Integer age,
Integer tel, String locked, String del, Date createTm, String createPerson, Date updateTm,
String updatePerson) {
super();
this.userId = userId;
this.userName = userName;
this.password = password;
this.name = name;
this.sex = sex;
this.email = email;
this.age = age;
this.tel = tel;
this.locked = locked;
this.del = del;
this.createTm = createTm;
this.createPerson = createPerson;
this.updateTm = updateTm;
this.updatePerson = updatePerson;
}
未找到合适的构造函数,
后加上空参构造器,即解决问题。public User() {
super();
}
看别人的博客,有的说是int与Integer的问题。不知为何
2.NullPointerException
空指针错误,
1.有未赋值的内部成员
2.有未自动装配的成员变量,即未添加 @Autuwired注解