Connection is read-only. Queries leading to data modification are not allowed
来源:互联网 发布:广州楼盘成交数据 编辑:程序博客网 时间:2024/04/27 19:17
错误原因是,使用spring配置了事物。配置如下:
<!-- 定义哪些方法需要执行事务 -->
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="get*" read-only="true" />
<tx:method name="query*" read-only="true" />
<tx:method name="find*" read-only="true" />
<tx:method name="load*" read-only="true" />
<tx:method name="select*" read-only="true" />
<!-- 指定目标方法采用哪种事务管理 -->
<tx:method name="*" propagation="REQUIRED" rollback-for="Exception" />
</tx:attributes>
</tx:advice>
因此如果在类似 get*方法中执行update操作的话,就会报“Connection is read-only. Queries leading to data modification are not allowed”的异常。
- 解决ssh中Connection is read-only. Queries leading to data modification are not allowed
- Connection is read-only. Queries leading to data modification are not allowed
- java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed
- Connection is read-only. Queries leading to data modification are not allowed
- Connection is read-only. Queries leading to data modification are not allowed
- Connection is read-only. Queries leading to data modification are not allowed
- java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed
- Connection is read-only. Queries leading to data modification are not allowed
- Connection is read-only. Queries leading to data modification are not allowed
- java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed
- Connection is read-only. Queries leading to data modification are not allowed
- jeeplus Connection is read-only. Queries leading to data modification are not allowed
- (dao)Connection is read-only. Queries leading to data modification are not allowed
- springboot JPA Connection is read-only. Queries leading to data modification are not allowed
- java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed
- Connection is read-only. Queries leading to data modification are not allowed
- Connection is read-only. Queries leading to data modification are not allowe
- Cause: java.sql.SQLException: Connection is read-only. Queries leading to data modification are not
- 自定义tld 标签
- artDialog 插件试用
- rsync 同步
- android 下载流文件的部分数据及断点续传的关键点header Range
- 我是昆明理工大学的大二学生这是我的第一篇blog
- Connection is read-only. Queries leading to data modification are not allowed
- memcached内存数据库安装配置
- 人生自古谁无死,你接下一句
- Linux下的压缩解压缩命令详解
- 黑马程序员-交通灯(自己写的)
- jenkins调整jdk版本不生效的解决办法
- 确定某个日期是当月中第几个星期几
- android流量监控类TrafficStats讲解
- .gitignore 无法忽略文件的解决方法