springboot Duplicate entry ‘1’ for key ‘PRIMARY’解决办法

设置主键自增即可

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;
private String name;
private String author;
private int status;
private String description;