@Id
@KeySql(useGeneratedKeys = true)
private Integer id;
使用上述注解就可以实现
public void test{
@Autowwired
Mapper mapper;
mapper.insert(user)
Integer id = user.getId();
}
@Id
@KeySql(useGeneratedKeys = true)
private Integer id;
使用上述注解就可以实现
public void test{
@Autowwired
Mapper mapper;
mapper.insert(user)
Integer id = user.getId();
}