基于Schemad的切面配置:
1.方式一
<aop:config proxy-target="true">
<aop:aspect ref="adviceMehtods">---声明切面的bean
<aop:before pointcut="target(com.cgh.pointcut1) and exectution(public * *(..))" method="getAdviceMethod"></aop:before>
<aop:aspect>
</aop:config>
2.方式二
<aop:config proxy-target-class="true">
<aop:ponitcut id="pointcut1" expression="target(com.cgh.pointcut1) and execution(public * * (..))"/>
<aop:before point-ref="pointcut1" method="getAdviceMethod"></aop:before>
</aop:config>
3.方式三
<aop:config proxy-target-class="true">
<aop:advisor advice-ref="testAdvice" piontcut="execution(com..*.Waite4r.greetTo(..))"></aop:advisor>
</aop:config>
<bean id="testAdvice" class="com.chg.testAdvice"/>----前置增强的bean