Cannot execute statement in a READ ONLY transaction.

报错如下:


Cause: java.sql.SQLException: Cannot execute statement in a READ ONLY transaction.
; uncategorized SQLException for SQL []; SQL state [25006]; error code [1792]; Cannot execute statement in a READ ONLY transaction.; nested exception is java.sql.SQLException: Cannot execute statement in a READ ONLY transaction. -(:106)

Cannot execute statement in a READ ONLY transaction._第1张图片

原因为:方法名使用了get开头,事务管理中配置了对应的状态。

解决:修改方法名,起名的同时注意配置文件中的要求。

 

你可能感兴趣的:(常见程序问题)