mysqlmapper批量更新

发布时间: 2023-11-21 12:56 阅读: 文章来源:1MUMB4519PS

public interface AMapper{

public void batchUpdateA(List aList>);

}

mysql

update a

set name = #{a.name,jdbcType=VARCHAR}

where id = #{a.id}

oracle

update a

set name = #{a.name,jdbcType=VARCHAR}

where id = #{a.id}

mybatis/mysql批量更新

application.properties spring.datasource.url属性值加&allowMultiQueries=true

spring.datasource.url jdbc:mysql://127.0.0.1:3306/xx?characterEncoding=utf-8&serverTimezone=UTC&allowMultiQueries=true

•••展开全文