Connection is read-only. Querles Leading to data modification are not allowed
调用Service的方法对数据库进行增删改的操作时报错
Connection is read-only. Querles Leading to data modification are not allowed
错误原因:
Service实现类上使用了注解@Transaction(read-only="true")该Service只能做查询的操作
解决方案:
在方法上加注解Transaction(read-only="false")方法上的注解属性优先级会大于类注解属性
...
原创
2021-11-29 15:54:05 ·
205 阅读 ·
0 评论