Hibernate批量更新异常

org.springframework.transaction.TransactionSystemException: Could not commit Hibernate transaction; nested exception is org.hibernate.TransactionException: Transaction not successfully started




Session session = getHibernateTemplate().getSessionFactory().getCurrentSession();

改为

Session session = getHibernateTemplate().getSessionFactory().openSession();



完整代码如下:






猜你喜欢

转载自tanweneye.iteye.com/blog/2105167