- getCurrentSession()与openSession的区别
getCurrentSession()得到的session不用close();openSession得到的Session必须close();
阐述了在Java中使用getSession方法时,getCurrentSession()与openSession的主要区别,前者返回的Session无需手动关闭,而后者则需要确保在使用完毕后进行关闭。

被折叠的 条评论
为什么被折叠?