调整以下xml的格式:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans>
<!--CONFIG-->
<bean id="bean" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>com.company.springaop.test.Bean</value>
</property>
<property name="target">
<ref local="beanTarget"/>
</property>
<property name="interceptorNames">
<list>
<value>beforeAdvisor</value>
<value>afterAdvisor</value>
<value>nullPointerAdvisor</value>
</list>
</property>
</bean> <!--CLASS-->
<bean id="beanTarget" class="com.company.springaop.test.BeanImpl"/> <!--ADVISOR-->
<!--Note: An advisor assembles pointcut and advice-->
<bean id="beforeAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
<property name="advice">
<ref local="theBeforeAdvice"/>
</property>
<property name="patterns"> <value>*.Method*</value> </property>
</bean> <!--ADVICE-->
<bean id="theBeforeAdvice" class="com.company.springaop.test.TestBeforeAdvice"/>
<bean id="afterAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
<property name="advice">
<ref local="theAfterAdvice"/>
</property>
<property name="pattern">
<value>*.Method*</value>
</property>
</bean>
<bean id="theAfterAdvice" class="com.company.springaop.test.TestAfterAdvice"/>
<bean id="nullPointerAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
<property name="advice">
<ref local="theNullPointerAdvice"/>
</property>
<property name="pattern">
<value>*.Method*</value>
</property>
</bean>
<bean id="theNullPointerAdvice" class="com.company.springaop.test.TestThrowAdvice"/>
<test/>
</beans>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans>
<!--CONFIG-->
<bean id="bean" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>com.company.springaop.test.Bean</value>
</property>
<property name="target">
<ref local="beanTarget"/>
</property>
<property name="interceptorNames">
<list>
<value>beforeAdvisor</value>
<value>afterAdvisor</value>
<value>nullPointerAdvisor</value>
</list>
</property>
</bean> <!--CLASS-->
<bean id="beanTarget" class="com.company.springaop.test.BeanImpl"/> <!--ADVISOR-->
<!--Note: An advisor assembles pointcut and advice-->
<bean id="beforeAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
<property name="advice">
<ref local="theBeforeAdvice"/>
</property>
<property name="patterns"> <value>*.Method*</value> </property>
</bean> <!--ADVICE-->
<bean id="theBeforeAdvice" class="com.company.springaop.test.TestBeforeAdvice"/>
<bean id="afterAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
<property name="advice">
<ref local="theAfterAdvice"/>
</property>
<property name="pattern">
<value>*.Method*</value>
</property>
</bean>
<bean id="theAfterAdvice" class="com.company.springaop.test.TestAfterAdvice"/>
<bean id="nullPointerAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
<property name="advice">
<ref local="theNullPointerAdvice"/>
</property>
<property name="pattern">
<value>*.Method*</value>
</property>
</bean>
<bean id="theNullPointerAdvice" class="com.company.springaop.test.TestThrowAdvice"/>
<test/>
</beans>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货