只需在插入语句上配置:
useGeneratedKeys="true"
keyProperty ="id"
<insert id="insertSelectiveMemberAcc" useGeneratedKeys="true" keyProperty="id" parameterType="com.member.domain.MemberAccInfo"> insert into MEMBER_ACC_INFO </insert >
原文地址:http://10960988.blog.51cto.com/10950988/1791089