org.springframework.dao.DuplicateKeyException: A different object with the same identifier value was already associated with the session : [com.chuai.pojo.User#4]; nested exception is org.hibernate.NonUniqueObjectException: A different object with the same identifier value was already associated with the session : [com.chuai.pojo.User#4]
原因:
不同的对象具有同一个session,在dao层操作之前清空session即可。
A different object with the same identifier value was already associated with the session
猜你喜欢
转载自blog.csdn.net/weixin_44142296/article/details/85055363
今日推荐
周排行