MyBatis Plus 只插入只有自增id字段的表

mybatis plus技巧,插入数据时,怎么插入自定义的id信息,不走自增策略

在实体类中:

@TableId(value = "id", type = IdType.AUTO)
private Integer id;

改成

@TableId(value = "id", type = IdType.INPUT)
private Integer id;
原文地址:https://www.cnblogs.com/xuehu666/p/14884421.html