? <update id="updateBatchData" parameterType="java.util.List">
? ? ? ? <foreach collection="list" item="bean" index="index" open="" close="" separator=";">
? ? ? ? ? ? UPDATE demo
? ? ? ? ? ? <set>
? ? ? ? ? ? ? ? name=#{bean.name}
? ? ? ? ? ? </set>
? ? ? ? ? ? <where>
? ? ? ? ? ? ? ? id= #{bean.id}
? ? ? ? ? ? </where>
? ? ? ? </foreach>
? ? </update>
注意:?必須在配置連接數(shù)據(jù)庫url后面帶一個參數(shù) &allowMultiQueries=true垮媒,表示允許批量操作