DuplicateKeyException: a different object with the same identifier value was already associated with the session 异常处理:
这个问题是由于hibernate的session缓存中对象存在相同id导致的,具体产生原因可根据 https://www.cnblogs.com/bulrush/p/7786973.html 这篇博客分析,分析出原因解决办法就很简单了
PS:最粗暴的方法,对象操作以后直接evict或者clear