@Override
public boolean ValidateUserInfo(UserInfo u) {
// TODO Auto-generated method stub
String hql = "from UserInfo u where u.userNo = ? and u.userPwd = ?";
Query query = sessionFactory.getCurrentSession().createQuery(hql);
query.setString(0, u.getUserNo());
query.setString(1, u.getUserPwd());
return query.executeUpdate()> 0;
}
报错:
严重: Servlet.service() for servlet [springMVC] in context with path [/sim] threw exception [Request processing failed; nested exception is org.hibernate.hql.internal.QueryExecutionRequestException: Not supported for select queries [from cn.com.bean.UserInfo as u where u.userNo = ?and u.userPwd = ?]] with root cause
org.hibernate.hql.internal.QueryExecutionRequestException: Not supported for select queries [from cn.com.bean.UserInfo as u where u.userNo = ?and u.userPwd = ?]
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货