Mybatis新增save结束后自动返回主键id
<!-- 插入数据:返回记录主键id值 -->
<insert id="insert" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
insert into stu (name,age) values (#{name},#{age})
</insert>
https://www.cnblogs.com/charlypage/p/11253610.html
https://blog.csdn.net/xy405580364/article/details/102837263
注:并不是返回的数据里获取id,而是添加的对象里添加成功后会自动添加id