给insert 加上useGeneratedKeys="true" keyProperty="类中对应的属性" 就好了。
mybatis mysql插入返回主键
最新推荐文章于 2022-05-01 18:29:33 发布
给insert 加上useGeneratedKeys="true" keyProperty="类中对应的属性" 就好了。