mybatis批量更新表setting parameters 错误

mybatis中想用 foreach标签 批量update set表
下面是mapper.xml

<update id="updateMonitorById" parameterType="java.util.List">
        <foreach collection="list" item="bean" index="index" open="" close="" separator=";">
            UPDATE dt_monitor
            <set>
                account_name = #{bean.companyAccount},
                sip_name = #{bean.sipName}
            </set>
            <where>
                company_id = #{bean.companyId}
            </where>
            ORDER BY update_time desc limit 1
        </foreach>
</update>

传入的List数量大于1的时候就报错。
后来发现是数据库配置的原因
在配置数据库连接地址中加上
&allowMultiQueries=true

jdbcDriver=com.mysql.jdbc.Driver
jdbcUrl=jdbc:mysql:///cake?characterEncoding=utf-8&allowMultiQueries=true
jdbcusername=root
jdbcpassword=1
原文地址:https://www.cnblogs.com/magicya/p/11545024.html