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


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

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

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

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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM