原文:出现错误: 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

在我解决完上一个问题之后,马上又出现了新的问题,错误如下: 错误的原因说的很清楚:只读模式下 FlushMode.NEVER MANUAL 写操作不被允许:把你的Session改成FlushMode.COMMIT AUTO或者清除事务定义中的readOnly标记。 下面是错误代码: 下面是修正之后的代码: 我来解 照 释 搬 一下原理: 通过getSession 取回来的session的flush ...

2017-11-28 23:41 0 15503 推荐指数:

查看详情

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