org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at org.hi
原因 ①:
sf = new AnnotationConfiguration().configure().buildSessionFactory();
写成
sf = new Configuration().configure().buildSessionFactory();
原因 ②:
数据表中有重复ID值