WARN - SQL Error: 1062, SQLState: 23000
ERROR - Duplicate entry 'hhhhh' for key 2
ERROR - Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
原来我数据库表customer 中 custname字段设定了内容唯一性约束UNIQUE KEY `CUST_NAME` (`CUST_NAME`) 结果正好插入了个表中存在的值,才报了错!