public Employee findByUsernameAndPassword(Employee employee) {
String hql = "from Employee where username = ? and password = ?";
List<Employee> list = this.getHibernateTemplate().find(hql,employee.getUsername(),employee.getPassword());
if(list.size()>0) {
return list.get(0);
}
return null;
}
异常:
2017-09-26 11:03:49 [ä¿¡æ¯] Exception occurred during processing request: null
java.lang.NullPointerException
at cc.test.employee.dao.impl.EmployeeDaoImpl.findByUsernameAndPassword(EmployeeDaoImpl.java:18)
添加回答
举报
0/150
提交
取消