mybatis 插入返回主键配置:
<insert id="insert" parameterType="com.cn.pojo.Sequence"
useGeneratedKeys="true" keyProperty="id">
INSERT
INTO
sequence
<trim prefix="(" suffix=")" suffixOverrides=",">
name,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{name,jdbcType=VARCHAR},
</trim>
</insert>