Caused by: javax.persistence.EntityExistsException: A different object with the same identifier valu

session中已经存在一个与当前对象不同但是标识符相同的对象。

注意jpa生成的实体是不是没有设置自增长

@GeneratedValue(strategy= GenerationType.IDENTITY)   //自增长

猜你喜欢

转载自blog.csdn.net/myme95/article/details/84561339
今日推荐