<!-- 往数据库中插入一个主键为UUID 的记录--><insertid="save"parameterType="user"><selectKeykeyProperty="id"resultType="string"order="BEFORE">
select uuid();
</selectKey>
insert into user values(#{id},#{username},#{password})
</insert><insertid="insertUser"parameterType="user"><selectKeykeyProperty="id"keyColumn="id"resultType="integer">
select last_insert_id();
</selectKey>
insert into user value(#{id},#{username},#{password})
</insert><insertid="insert"parameterType="user"useGeneratedKeys="true"keyProperty="id">
insert into user value(#{id},#{username},#{password})
</insert>