hibernate4
paul_lmc
这个作者很懒,什么都没留下…
展开
-
spring4+hibernate4
最近因为项目上都需要,使用spring4.2+springmvc4.2+hibernate4,进行项目开发。起初,本周hibernate用4最新的版本,所以用了hibernate4.2.21final,结果在整合spring时,总是报:session is closed后来,经过反复试验解决,最后发现好像是hibernate4.2.21这个版本有问题,立即更换为4.1.11final版原创 2018-01-29 09:39:11 · 209 阅读 · 0 评论 -
spring4+hibernate4事务处理
最近总是遇到HibernateException: Could not obtain transaction-synchronized Session for current thread错误业务场景:在job中执行Service中的方法(事务是在xml中配置,针对所有service的方法的)我的springContext.xml配置如下:<tx:advice id="txAdvice" t...原创 2018-05-23 10:30:29 · 284 阅读 · 0 评论