protected Person getOne(int id){
Session session = HibernateSessionFactory.getSession();
Person person = new Person();
try{
session.load(person, id);
}catch(Exception e){
e.printStackTrace();
}finally{
session.close();
}
return person;
}
本文共 285 字,大约阅读时间需要 1 分钟。
protected Person getOne(int id){
Session session = HibernateSessionFactory.getSession();
Person person = new Person();
try{
session.load(person, id);
}catch(Exception e){
e.printStackTrace();
}finally{
session.close();
}
return person;
}
转载于:https://my.oschina.net/JiangTun/blog/472679