Spring Boot—Mybatis XML insert数据返回主键ID

mapper.xml


   insert  into user values(null,#{userPojo.userName},#{userPojo.userSex},#{userPojo.userAge})

keyColumn对应实体字段名

keyProperty对应Mapper @Param 参数

你可能感兴趣的:(Spring,Boot,Java)