org.springframework.dao.DuplicateKeyException:
Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry ‘1’ for key ‘user.PRIMARY’
Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry ‘1’ for key ‘user.PRIMARY’
The error may involve com.kuang.mapper.UserMapper.insert-Inline
The error occurred while setting parameters
SQL: INSERT INTO user ( id, name, age, email ) VALUES ( ?, ?, ?, ? )
Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry ‘1’ for key ‘user.PRIMARY’
数据库存在id为1的数据,更换id值