分类: Java
2015-04-05 10:47:22
<bean id="userDao" class="cn.itcast.c_aspectj_xml.UserDao">bean>
<bean id="myAspect" class="cn.itcast.c_aspectj_xml.MyAspect">
bean>
<aop:config proxy-target-class="true">
<aop:aspect ref="myAspect">
<aop:pointcut id="daoPoincut" expression="execution(* cn.itcast.c_aspectj_xml.UserDao.*(..))" />
<aop:before method="before" pointcut-ref="daoPoincut"/>
aop:aspect>
aop:config>
<aop:aspectj-autoproxy>aop:aspectj-autoproxy>
<bean id="userDao" class="cn.itcast.d_aspectj_annotation.UserDao">bean>
<bean id="myAspect" class="cn.itcast.d_aspectj_annotation.MyAspect">
bean>