摘要:
就算在catch中抛出异常,也会执行到finally中 阅读全文
posted @ 2021-02-23 09:00
信铁寒胜
阅读(50)
评论(0)
推荐(0)
摘要:
1、问题:如何在spring和hibernate整合中,有个特殊需要,就是不用spring的AOP来切入事务,而是手动写事务。 这个时候如果用getCurrentSession,就会报“Could not obtain transaction-synchronized Session for cur 阅读全文
posted @ 2021-02-23 08:56
信铁寒胜
阅读(546)
评论(0)
推荐(0)
摘要:
1、openSession必须关闭,currentSession在事务结束后自动关闭 2、openSession没有和当前线程绑定,currentSession和当前线程绑定 阅读全文
posted @ 2021-02-23 08:51
信铁寒胜
阅读(158)
评论(0)
推荐(0)

浙公网安备 33010602011771号