<!-- 事务相关配置 -->
<tx:advice id="txdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="delete*" propagation="REQUIRED" read-only="false"
rollback-for="java.lang.Exception" no-rollback-for="java.lang.RuntimeException"/>
<tx:method name="insert*" propagation="REQUIRED" read-only="false"
rollback-for="java.lang.RuntimeException" />
<tx:method name="update*" propagation="REQUIRED" read-only="false"
rollback-for="java.lang.Exception" />
<tx:method name="find*" propagation="SUPPORTS"/>
<tx:method name="get*" propagation="SUPPORTS"/>
<tx:method name="select*" propagation="SUPPORTS"/>
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="pc" expression="execution(public * org.ssm.services.impl.*.*(..))" /> <!--把事务控制在Service层-->
<aop:advisor pointcut-ref="pc" advice-ref="txdvice" />
</aop:config>
name-generator="org.ssm.overwrite.spring.ServicesNameGenerator"
use-default-filters="false"
annotation-config="false">
<context:include-filter type="regex" expression=".*Impl"/>
</context:component-scan>