ibatis insert之后返回主键
1.配置文件
??? <insert id="testInsert" parameterkeyProperty="id">
??? ?????????? select seq_for_xx.Nextval from dual
??? ??????? </selectKey>
??? ??? ??? INSERT INTO xx(ID,ACCOUNTID,OSTEMPLATEID,VCPU,MEMORY,VMONAME,VMNUMBER,TAGS,PASSWORD,PREFIX,STARTDATE,ENDDATE,TZINDEX,SUBMITTIME,APPROVEDTIME,OS,STATE)
???????????? VALUES(#id#,..)
??? </insert>
2.java代码
?? Integer id = (Integer)sqlMapClientTemplate.insert("xx", xx);