spring2.5 事务控制 在 junit4的单元测试中可以,可是实际调用却事务无效

spring2.5 事务控制 在 junit4的单元测试中可以,可是实际调用却事务无效

还有就是在单元测试中可以删除数据,但实际调用却不能,实际调用添加数据可以



 <aop:config proxy-target-class="true">
    <aop:pointcut id="serviceOperation" expression="execution(* com.s.service.*.*(..))"/>
    <aop:advisor pointcut-ref="serviceOperation" advice-ref="txAdvice"/>
</aop:config>


tx:attributes






/tx:attributes
/tx:advice
[b]问题补充:[/b]
还是没有解决。感觉到非常奇怪

是不是把域对象放到Spring MVC Controller中方法的参数里面了,这样在Spring 2.5 里面会引起Bug 造成无法删除,我遇到过,换Struts2就没有问题,或者不能把域对象放到Controller中方法的参数里面

详解spring事务属性
http://www.iteye.com/topic/78674