登陸進去提示500錯誤
HQL 代碼敲完 ?然后執行查詢的方法
package?com.muke.dao.Impl; import?java.util.List; import?org.springframework.orm.hibernate3.support.HibernateDaoSupport; import?com.muke.dao.sshDao; import?com.muke.domain.User; public?class?sshDaoImpl?extends?HibernateDaoSupport?implements?sshDao?{ ???? @Override public?boolean?verify(User?user)?{ String?hql="from?user?where?username=???and?pwd=???"; ?List<User>?list=this.getHibernateTemplate().find(hql,?user.getUsername(),user.getPwd()); ?if(list.size()>0){ ?return?list.size()>0; ?}else{ ?return?false; ?} ? } }
2017-06-21
我的也是500錯誤,org.springframework.orm.hibernate3.HibernateQueryException: Expected positional parameter count: 2, actual parameters: [com.employee.entity.Employee@6350ed68] [from Department where username = ? and password = ?]; nested exception is org.hibernate.QueryException: Expected positional parameter count: 2, actual parameters: [com.employee.entity.Employee@6350ed68] [from Department where username = ? and password = ?],這是什么原因?
2017-04-18
已經決解了原來 ?HQL 語句哪里的from 后面的不是表明 而是實體類類名