mybatis插入自动返回主键id 使用这个和属性keyProperty = “id”,表示在插入之后自动返回到对象属性中。 <insert id="insertGsTrafficControl" parameterType="GsTrafficControl" keyProperty="id">