public User findByName(String username) {
String hql="from User where username=?";
List
return list.isEmpty()?null:list.get(0);
}
username是主键么?
public User findByName(String username) {
User us=(User)this.getHibernateTemplate().get(User.class, username);
return us;
}
this.getRequest().getParameter(arg0);