<insert id="insert" parameterType="com.xxx.xxxx.pojo.User">
insert into t_user (name)
values (#{user.name})
<selectKey resultType="Integer" order="AFTER" keyProperty="user.userId">
SELECT LAST_INSERT_ID() AS userId
</selectKey>
</insert>

第二种方法

<insert id="insert" parameterType="Spares"
useGeneratedKeys="true" keyProperty="id">
insert into system(name) values(#{name})
</insert>

然后在调用的时候就可以用对象的get属性方法来获取了

最新文章

  1. UIScrollView解决无法触发手势
  2. Map/Reduce 工作机制分析 --- 数据的流向分析
  3. Delphi 使用CHM文件制作系统帮助文档(上下文感知帮助的制作)
  4. WEB项目后端跨域请求
  5. mysql-binlog日志恢复数据库
  6. SPRING IN ACTION 第4版笔记-第三章ADVANCING WIRING-007-给BEAN运行时注入值placeholder、@Value
  7. WebLogic12c 注册windows系统服务
  8. 设置UIScrollView只可以水平或者竖直滚动
  9. JS代码混淆 支持PHP .NET PERL
  10. CodeForces 446B DZY Loves Modification
  11. windows下spark开发环境配置
  12. SpringBoot开发案例之整合Dubbo分布式服务
  13. 算法:60.第k个排列
  14. Painting the Fence Gym - 101911E(构造)
  15. ECMAscript5 新增数组内函数
  16. csu oj 1341 string and arrays
  17. jquery操作checked
  18. “error : unknown filesystem”的解决的方法
  19. 淘宝开源Web服务器Tengine基本安装步骤
  20. TEXTBOX属性TEXTMODE设置为PASSWORD后,后台不能给这个TEXTBOX赋值原因

热门文章

  1. WebLogic中&quot;域&quot;的概念
  2. CEF3研究(三)
  3. 从日志文件解决ArcGIS Server性能低下问题的步骤(1)
  4. request.getAttribute()与request.setAttribute()
  5. FancyCoverFlow
  6. 关于axis2.1.6与websphere7的包冲突问题的解决方式
  7. What are some advantages of using Node.js over a Flask API?
  8. bzoj2461: [BeiJing2011]符环
  9. python库学习笔记——BeautifulSoup处理子标签、后代标签、兄弟标签和父标签
  10. BZOJ_1532_[POI2005]Kos-Dicing_二分+网络流