db2报错syntax error, error in :‘with RS‘, expect AS, actual null, pos 129, line 1, column 130, token E

syntax error, error in :‘with RS’, expect AS, actual null, pos 129, line 1, column 130, token EOF

db2数据库,sql语句在工具中正常执行,代码中执行报错。

报错原因:”for update with RS“,使用行锁

处理:

 1、修改application.yml文件,
 
  spring.datasource.druid.filter.stat.merge-sql = false

  spring.datasource.druid.filter.stat.db-type = db2
 

  2、修改pom文件
 
  排除common.jar中的低版本druid依赖,引入1.2.16版本的druid依赖
 

你可能感兴趣的:(db2)