JZTXT
  • 首页
  • Ai
  • Java
  • Python
  • Android
  • Mysql
  • JavaScript
  • Html
  • CSS

Statement.executeQuery() cannot issue statements that do not produce result sets.

发布时间 2023-08-03 10:03:50作者: panyanquandexiaodi

在用Spring Boot JPA的时候导致Statement.executeQuery() cannot issue statements that do not produce result sets

解决方法:
在@Query上加上@Modifying,表示不需要返回值

@Query对应到底层jdbc框架是Statement.executeQuery(),而@Modifying@Query对应的是Statement.execute();

    本栏目推荐文章
  • dlv调试时访问不可达函数报错please use a line with a statement
  • Cannot load driver class: oracle.jdbc.OracleDriver
  • Cannot re-initialize CUDA in forked subprocess.
  • oneforall配置环境,报错cannot import name 'sre_parse' from 're' 解决方法
  • 解决Nginx报error while loading shared libraries: libjemalloc.so.2: cannot open
  • mysql--You must reset your password using ALTER USER statement before executing this statement
  • 查看mvn版本:cannot execute binary file
  • 饿了么组件上传图片 element-ui upload Cannot set property ‘status‘ of null错误解决方案
  • 修改账户密码时提示 ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement 错误
  • Kafka消费端抛出异常Offset commit cannot be completed since the consumer is not part of an active group for auto partition assignment; it is likely that the consumer was kicked out of the group的解决方案
版权声明:本网站为非赢利性站点,本网站所有内容均来源于互联网相关站点自动搜索采集信息,相关链接已经注明来源。
联系我们