SpringBoot+MySql+Druid 在delete标签中写多个sql语句时,出现异常:multi-statement not allow
一、背景因为某个需求需要级联删除数据库中的内容,若是写多个sql语句有点不符合本人写代码的习惯,所以就在这记录一下解决方法。分享也是程序员的一种美德。二、问题描述三、解决方法一、1、配置数据库连接,添加allowMultiQueries=true修改application.yml中的数据库连接urlspring: datasource: username: root password: 123456 url: jdbc:mysql://localhost:3306/h
原创
2020-08-30 18:23:18 ·
1008 阅读 ·
0 评论