qq_Disorganized_04359428
2017-03-08 09:30
这个例子中没有用到
吧???求讲解<!-- 事务注解:开启注解支持-->
<tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true"/>
<!-- 全局AOP事物,除get,list,select,query开头的方法外,都处在事物当中 -->
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="select*" propagation="REQUIRED" read-only="true" />
<tx:method name="get*" propagation="REQUIRED" read-only="true" />
<tx:method name="list*" propagation="REQUIRED" read-only="true" />
<tx:method name="query*" propagation="REQUIRED" read-only="true" />
<tx:method name="*" propagation="REQUIRED" read-only="false" rollback-for="java.lang.Exception"/>
</tx:attributes>
</tx:advice>
<!-- 配置事务切面 到Service层 -->
<aop:config expose-proxy="true" proxy-target-class="true" >
<aop:advisor advice-ref="txAdvice" pointcut="execution(* com.xt.shop.base.service..*.*(..))"/>
</aop:config>
是没有讲到,你可以参照一下这个博客里面的内容http://tonl.iteye.com/blog/1966075;
Spring入门篇
268791 学习 · 963 问题
相似问题