java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed

时间:2014-03-06 12:46:38   收藏:0   阅读:744
   今天更新数据时出现这个错误:
java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed

原因是:我在service层设置了只读。@Transactional(readOnly = true)

而更新的方法没有把可读设置为FALSE。解决办法是在方法上加上readOnly=FALSE

注解如下:    @Transactional(readOnly = false, isolation = Isolation.DEFAULT, propagation = Propagation.REQUIRED)


java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed,布布扣,bubuko.com

原文:http://blog.csdn.net/zl544434558/article/details/20533329

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!