Jeecg外部引入的表,如何设置自增类型的主键

找到生成代码的entity类的主键字段

/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.Integer id;

把上面的 type = IdType.ASSIGN_ID 改成 type = IdType.AUTO 即可

@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id")
private java.lang.Integer id;
原文地址:https://www.cnblogs.com/Bruce_H21/p/14637296.html