AOP XML
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean name="/login" class="action.LoginAction">
??<property name="ha">
?? <ref bean="hahabiz" />
??</property>
</bean>
<bean id="after" class="proxy.afterAdvice" />
<bean id="before" class="proxy.beforeAdvice" />
<bean id="around" class="proxy.aroundAdvice" />
<bean id="biz" class="biz.ha" />
<bean id="hahabiz"
??class="org.springframework.aop.framework.ProxyFactoryBean">
??<!--
?? 濡傛灉proxyInterfaces榪欎釜灞炴鈧娌℃湁涔熷彲浠ュ憪汊偓傘鈧瑐汊偓備負(fù)鍟ュ憿錛?
??-->
??<property name="proxyInterfaces">
?? <list>
????<value>biz.haha</value>
?? </list>
??</property>
??<property name="interceptorNames">
?? <list>
????<!--<value>after</value>
????<value>before</value>
????--><value>around</value>
?? </list>
??</property>
??<property name="target">
?? <ref bean="biz" />
??</property>
</bean>
</beans>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean name="/login" class="action.LoginAction">
??<property name="ha">
?? <ref bean="hahabiz" />
??</property>
</bean>
<bean id="after" class="proxy.afterAdvice" />
<bean id="before" class="proxy.beforeAdvice" />
<bean id="around" class="proxy.aroundAdvice" />
<bean id="biz" class="biz.ha" />
<bean id="hahabiz"
??class="org.springframework.aop.framework.ProxyFactoryBean">
??<!--
?? 濡傛灉proxyInterfaces榪欎釜灞炴鈧娌℃湁涔熷彲浠ュ憪汊偓傘鈧瑐汊偓備負(fù)鍟ュ憿錛?
??-->
??<property name="proxyInterfaces">
?? <list>
????<value>biz.haha</value>
?? </list>
??</property>
??<property name="interceptorNames">
?? <list>
????<!--<value>after</value>
????<value>before</value>
????--><value>around</value>
?? </list>
??</property>
??<property name="target">
?? <ref bean="biz" />
??</property>
</bean>
</beans>
總結(jié)
- 上一篇: 为什么要进行二手车去中介化?
- 下一篇: 乌鲁木齐哪里修宝来车好