传入HibernateCallback借口的对象一定要序列化

传入HibernateCallback借口的对象一定要序列化
public Loginer getLoginer(final Loginer loginer) throws Exception {

return getHibernateTemplate().execute(
new HibernateCallback<Loginer>(){

public Loginer doInHibernate(final Session session)
throws HibernateException, SQLException {
String sql = "from Loginer as lg where lg.loginerId = '"+loginer.getLoginerId()+"' and lg.status = 1 ";
return (Loginer) session.createQuery(sql).uniqueResult();
}

}
);
}

你可能感兴趣的:(传入HibernateCallback借口的对象一定要序列化)