spring aop pointcut 如何添加多個execution

spring aop添加多個包,用||或者or隔開

<!-- 只對業務邏輯層實施事務 -->
	<aop:config expose-proxy="true">
		<aop:pointcut expression="execution(* demo.ssh.daoImpl.*.*(..)) || execution(* demo.mes.daoImpl.*.*(..))"  
			id="txPointcut" />
		<!-- Advisor定義,切入點和通知分別爲txPointcut、txAdvice -->
		<aop:advisor advice-ref="txAdvice" pointcut-ref="txPointcut" />
	</aop:config>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章