没有报任何的错误, 在执行删除或者更新后手动添加getSession().flush()方法,可是单元测试就可以执行,所以估计应该是事务问题; 方法是把事务的配置,从applicationContext移到springmvc.xml文件中去 <!-- 配置事务管理 --> <bean id="txManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory"></property> </be…
2015-09-09 21:49 · spring