這個查詢不需要事務(wù)。query.setProperties(user);更好,不然字段多了寫死人。理解的不夠深刻,寫的代碼好多費的。
2016-06-14
if(query.list().size()>0){
return true;
}
} catch (Exception e) {
e.printStackTrace();
}finally {
session.close();
}
return false;
}
return true;
}
} catch (Exception e) {
e.printStackTrace();
}finally {
session.close();
}
return false;
}
2016-06-14
public boolean usersLogin(Users user) {
Session session=HibernateSessionFactory.getSession();
try {
String hql="from Users where username=:username and password=:password";
Query query=session.createQuery(hql);
query.setProperties(user);
Session session=HibernateSessionFactory.getSession();
try {
String hql="from Users where username=:username and password=:password";
Query query=session.createQuery(hql);
query.setProperties(user);
2016-06-14
哈哈,彈幕彈出課程結(jié)束的時候,竟然有些不舍! 謝謝老師
struts2源碼下載:http://struts.apache.org/download.cgi#struts25
2016-06-09
誰要整套源碼的可以找我要QQ:466987815,哈哈,做完的心情就是不一樣
HTTP Status 404 - No result defined for action action.UsersAction and result input
type Status report
message No result defined for action action.UsersAction and result input
description The requested resource is not available.
Apache Tomcat/8.0.33
type Status report
message No result defined for action action.UsersAction and result input
description The requested resource is not available.
Apache Tomcat/8.0.33
2016-06-07