springMVC后台dao层增加数据后获取增加对象的id

来源:互联网 发布:入门java看什么书 编辑:程序博客网 时间:2024/06/06 12:22

@Insert("insert into test(id,te)values(#{id},1)")

@SelectKey(statement="SELECT LAST_INSERT_ID() AS VALUE",resultType = Integer.class, before = false, keyProperty = "id")

public Integer test(Test test);

原创粉丝点击