原文:出現錯誤: 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