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.

发现是和Spring的事务配置有关系

调用的Service里的函数名一定要和自己定义的名字要写的匹配,名字没对上就会使用最后的* 导致只能 只读 

posted @ 2019-06-01 16:45  King丶小明  阅读(326)  评论(0编辑  收藏  举报