MyBatis+MySQL 返回插入的主键ID

需求:使用MyBatis往MySQL数据库中插入一条记录后,须要返回该条记录的自增主键值。数据库 方法:在mapper中指定keyProperty属性,示例以下:mybatis <insert id="insertAndGetId" useGeneratedKeys="true" keyProperty="userId" parameterType="com.chenzhou.mybatis.Us
相关文章
相关标签/搜索