NND ,源码实在复杂,先整理个思路吧
AOP配置文件demo
<bean id="daoImpl" class="com.xx.xx.pcwebv2.Dao.CDaoImp" />
<bean id="timeHandler" class="com.xx.xx.pcwebv2.Dao.TimeHandler" />
<aop:config proxy-target-class="true">
<aop:aspect id="time" ref="timeHandler">
<aop:pointcut id="addAllMethod" expression="execution(* com.xx.xx.pcwebv2.Dao.IDaoTest.select(..))" />
<aop:before method="printTime" pointcut-ref="addAllMethod" />
<aop:after method="printTime" pointcut-ref="addAllMethod" />
</aop:aspect>
</aop:config>
核心类是:AspectJAwareAdvisorAutoProxyCreator
, 在解析XML文件时, 以上配置在IOC中会额外多出如下beanDefinition