学习的时候花了很久才解决这个问题,记录之。
(一)报错信息
1.错误信息情况1:
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY,generator = "JDBC")
private Long id;
@Column
private String account;
@Column
private String password;
### Error updating database. Cause: org.postgresql.util.PSQLException: 错误: null value in column "id" of relation "user1" violates not-null constraint
详细:失败, 行包含(null, Lily ..., 678976 ...).
### The error may involve com.lzy.mapper.UserMapper.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO user1 ( id,account,password ) VALUES( ?,?,? )
### Cause: org.postgresql.util.PSQLException: 错误: null value in column "id" of relation "user1" violates not-null co