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

@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);

你可能感兴趣的:(java)