报错信息:org.springframework.dao.InvalidDataAccessApiUsageException:
Write operations are not allowed in read-only mode (FlushMode.NEVER) - turn your Session into FlushMode.AUTO or remove 'readOnly' marker from transaction definition


beans.xml中的问题
<!-- 事务切面 -->

<bean id="tx" class="org.springframework.transaction.interceptor.TransactionInterceptor"> 

<property name="transactionManager" ref="tm"></property>



<property name="transactionAttributes">

<props>

<prop key="reg">PROPAGATION_REQUIRED</prop>

<prop key="task_*">PROPAGATION_REQUIRED</prop>

<prop key="*">PROPAGATION_REQUIRED</prop>

</props>

</property>

</bean>

加上红色部分语句就ok了!

最新文章

  1. BZOJ 2844 albus就是要第一个出场 ——高斯消元 线性基
  2. jsp静态、动态引入其他jsp
  3. html5设计原理(转)
  4. [转]Windows8下设置VS默认启动方式为管理员启动
  5. MySQL 插入数据时,中文乱码???问题的解决
  6. POJ 2697 A Board Game (bfs模拟)
  7. andorid 开发笔记 -- 问题与解决
  8. 传说中的华为Python笔试题——两等长整数序列互换元素,序列和的差值最小(修正)
  9. HDU 2102 A计划 经典搜索
  10. 为什么ajax 必须同源,same origin policy
  11. GacUtil
  12. Zip文件和RAR文件解压
  13. Golang字符串函数认识(一)
  14. 使用SpringCloud搭建高可用服务注册中心
  15. MyEclipse CI 2018.8.0正式发布(附下载)
  16. hdu 1569 &amp;1565 (二分图带权最大独立集 - 最小割应用)
  17. Python+Selenium操作select下拉框
  18. 集训day15 t1 poj3728
  19. Transact-SQL 参考(数据库引擎)
  20. 学习路线 roadmap

热门文章

  1. 人工智能,你到底是天使or魔鬼?
  2. js语法之条件语句
  3. 算法38---292. Nim游戏
  4. HDU-2204- Eddy’s爱好 (容斥原理)
  5. BZOJ1567 [JSOI2008]Blue Mary的战役地图(二分+二维hash)
  6. Django之ORM的增删改查
  7. nginx index.html
  8. ElementUi rules表单验证
  9. 【转】一天学会PHP(转)
  10. ASP.NET-缓存outputcache参数