rg.hibernate.exception.GenericJDBCException: Could notexecute JDBC batch update
atorg.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)
atorg.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)
atorg.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
atorg.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
atorg.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)
atorg.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185)
atorg.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)

这种情况一般出现在Spring框架中   原因是加入了spring数据库声明式配置事务 ,read-only表示只读

Caused by: java.sql.SQLException: Connection is read-only

通过aop即时Aspect切面:横切多个对象技术,实现切面拦截方法,aop定义规则是

Caused by: java.sql.SQLException: Connection is read-only

aop切面监听到service中的方法


Caused by: java.sql.SQLException: Connection is read-only

这个时候我们可以改变方法名  既可以改变它的使用权限   



相关文章:

  • 2021-06-29
  • 2022-12-23
  • 2022-03-01
  • 2022-12-23
  • 2020-04-20
  • 2022-12-23
  • 2021-10-16
猜你喜欢
  • 2021-09-23
  • 2022-12-23
  • 2021-10-27
  • 2022-12-23
相关资源
相似解决方案