
项目中启用Druid的统计管理,在执行批量sql时出现
解决办法
1 追加 allowMultiQueries=true 参数spring.datasource.qhgyl.url=jdbc:mysql://localhost:13306/ggh?characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8&allowMultiQueries=true21 关闭 druid 的wall-filter
wall-filter会拦截多次声明请求的循环sql语句,即使设置为true,还会检测到sql语句间的’;'分号会视为sql已经结束,所以有sql循环,第二个sql语句就会报出异常。
直接注释掉
#spring.datasource.qhh.filters=wall