首页 > Web开发 > 详细

报错解决:No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here

时间:2016-11-14 12:15:26      阅读:433      评论:0      收藏:0      [点我收藏+]

大概分析一般使用了注解才会报这方面的错

1.没有在spring的ApplicationContext.xml中开启注解事务

<!-- 开启注解事务 -->
    <tx:annotation-driven transaction-manager="txManager"/>

2.没有在方法上挂注解事务标签

技术分享

 

报错解决:No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here

原文:http://www.cnblogs.com/cnsdhzzl/p/6061171.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!