时间:2021-07-01 10:21:17 帮助过:200人阅读
1、修改数据库连接参数加上allowMultiQueries=true,如:
hikariConfig.security.jdbcUrl=jdbc:mysql://xx.xx.xx:3306/xxxxx?characterEncoding=utf-8&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true
2、直接写多条语句,用“;”隔开即可
<delete id="deleteUserById" parameterType="String">
delete from user_role where id=#{id};
delete from user where userId=#{id};
</delete>
Java-mybatis-一次执行多条SQL语句
标签:amp xxx post class blog char url ilo 参数