1、数据源配置
添加 allowMultiQueries=true
spring.datasource.druid.url=jdbc:mysql://192.168.2.41:3306/stm?useUnicode=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true
2、druid如果配置了WallFilter
要添加以下配置
spring.datasource.druid.filter.wall.config.delete-allow=true
spring.datasource.druid.filter.wall.config.multi-statement-allow=true
3、mybatsi的mapper如下
<delete id="physicalDelete" parameterType="integer">
DELETE from t_operate_answer where questionnaire_id= #{id};
DELETE from t_operate_question where questionnaire_id= #{id};
DELETE from t_operate_questionnaire where id= #{id};
</delete>