利用aop:config切入配置事务代理
<!-- 事务通知 -->
<tx:advice id="txAdvice"
transaction-manager="transactionManager">
<!—配置事务传递属性-->
<tx:attributes>
<tx:method name="get*" propagation="SUPPORTS"/>
<tx:method name="find*" propagation="SUPPORTS"/>
<tx:method name="do*" propagation="SUPPORTS"/>
<tx:method name="reg*" propagation="REQUIRED"/>
<tx:method name="modify*" propagation="REQUIRED"/>
<tx:method name="valid*" propagation="SUPPORTS"/>
<tx:method name="process*" propagation="REQUIRED"/>
</tx:attributes>
</tx:advice>
<aop:config>
<!--切入点-->
<aop:pointcut id="bizMethods"
expression="execution(* org.companyname.myprj.services.*.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="bizMethods"/>
</aop:config>