No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional
来源:互联网 发布:生产法工业增加值算法 编辑:程序博客网 时间:2024/05/17 20:33
报这个错时因为在做SSH整合时在applicationContext.xml中没有做事物处理,下面代码是事物的处理,我是以注解的方式处理的?
<!-- 注解方式定义事物,proxy-target-class="true"表示采用动态代理类来管理事务,如果是false表示采用接口代理来管理事务(默认值为false) -->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<tx:annotation-driven transaction-manager="transactionManager"
proxy-target-class="true" />
然后在service层类前写入@Transactional就好了!
- No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional
- No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional
- No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional
- No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional
- No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional
- No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional
- No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional
- No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional
- No Datastore Session bound to thread, and configuration does not allow creation of non-transactional
- SmartGwt: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
- No Hibernate Session bound to thread, and configruation does not allow creation of non-transactional
- No Hibernate Session bound to thread, and configuration does not allow creation of non-transactiona
- No Hibernate Session bound to thread, and configuration does not allow creation of non-transactiona
- No Hibernate Session bound to thread, and configuration does not allow creation of non-transactiona
- 关于: No Hibernate Session bound to thread, and configuration does not allow creation of non-transacti
- 解决No Hibernate Session bound to thread, and configuration does not allow creation of non-transaction
- @Transactional未添加就报错:No Hibernate Session bound to thread, and configuration does not allow creation
- org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transac
- QT中状态机框架测试
- Shell Tips: 用GNU Screen实现发送交互到所有会话
- 混淆编译及参数说明
- Manage Notes
- svn 常用命令
- No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional
- Oracle数据文件转移和丢失处理
- 回传json时的遍历
- WebKit之HTML元素支持流程
- 使用 Screen 创建并管理多个 shell
- java 调用c#
- Zend Studio代码不能自动提示的解决修复方法
- String.getBytes() 用法
- 启动过程中的问题