码迷,mamicode.com
首页 > 编程语言 > 详细

spring整合之后运行报什么只读错误。Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.

时间:2018-10-06 12:09:32      阅读:131      评论:0      收藏:0      [点我收藏+]

标签:write   session   .com   dao   cti   als   flush   RKE   ado   

解决办法,

  再大dao的实现类上添加注解:

          @Transactional(readOnly = false )

  不让它只读就行了

spring整合之后运行报什么只读错误。Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.

标签:write   session   .com   dao   cti   als   flush   RKE   ado   

原文地址:https://www.cnblogs.com/shiwanming/p/9746737.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!