openSession和getCurrentSession
在比较openSession和getCurrentSession这两个方法之前,我们先认识一下这两个方法。
在进行配置信息管理时,我们一般进行一下简单步骤:
Configuration cfg = new Configuration(); // 获得配置信息对象
SessionFactory sf = cfg.configure().buildSessionFactory()
转载
2016-04-17 13:50:25 ·
248 阅读 ·
0 评论