MyBatis 批量插入并返回自动生成的ID(Mysql)
MyBatis batch insert return ids.
stackoverflow解决地址:
https://stackoverflow.com/questions/31847521/how-to-get-primary-keys-after-batch-insert-in-mybatis
要点:
1, MyBatis版本3.3.1或者以上
2,传入的参数名称必须是"list",如图:
MyBatis 批量插入并返回自动生成的ID(Mysql)
MyBatis batch insert return ids.
stackoverflow解决地址:
https://stackoverflow.com/questions/31847521/how-to-get-primary-keys-after-batch-insert-in-mybatis
要点:
1, MyBatis版本3.3.1或者以上
2,传入的参数名称必须是"list",如图: