Mybatis id自增,插入数据后返回id

来源:互联网 发布:网络营销策划方案例文 编辑:程序博客网 时间:2024/05/16 08:43



<insert id="add" useGeneratedKeys="true" keyProperty="id" parameterType="User">insert into tb_manager values(null,#{userName},#{password})</insert>

返回值为插入数据后的id


参考博客

原创粉丝点击