mybatis plus技巧,插入数据时,怎么插入自定义的id信息,不走自增策略
在实体类中:
@TableId(value = "id", type = IdType.AUTO) private Integer id;
改成
@TableId(value = "id", type = IdType.INPUT) private Integer id;
@TableId(value = "id", type = IdType.AUTO) private Integer id;
改成
@TableId(value = "id", type = IdType.INPUT) private Integer id;