报错内容:
是因为实体类文件中设置主键自增的类型不对导致的,建议再温习一下逐渐自增的类型以及使用方式
我自己的实体类里面设置的IdType为auto,但是主键id是char类型的,还不是int数值类型,所以无法设置为自增
这里需要换成
IdType.ID_WORKER_STR
@ApiModelProperty(value = "讲师ID") @TableId(value = "id", type = IdType.ID_WORKER_STR) private String id;
这样子就可以了,如果你的主键id类型是int等数值类型,就设置为auto,数据库设置一下id自增就可以了.
- 39 default SQLException Field doesn39 default sqlexception field 39 sqlexception localhost password 问题39 sqlexception product_name default gateway what 39 ssl_cipher 39 default用户 reset_default_graph 39 attributeerror tensorflow get_default_graph 39 attributeerror tensorflow doesn search shape visio doesn ubuntu mysql doesn exist