mybatis插入的时候返回主键

1.升级mybatis的版本。

2.insert中加入属性: useGeneratedKeys="true" keyProperty="id"

3. 增加 parameterType="java.util.List" 属性。
 
posted @ 2022-11-21 11:40  ForMei  阅读(29)  评论(0)    收藏  举报