As much i get from the spring 3 documentation that there are two ways of AOP
AspectJ - which include
<aop:config>
metadata in xml or using annotation@Aspect
Spring own implementation - which is using interfaces for advice(
BeforeAdvice
,AfterAdvice
etc)
--please correct me if i am wrong till now --
Now spring own implementation is implemented by AutoproxyCreator
(BeanNameAutoproxyCreator
, DefaultAdvisorAutoproxyCreator
) which creates the proxy at the time of bean creation using BeanPostProcessor
.
But how proxy of AspectJ is done in Spring .How Aspect class either provided by @Aspect
of by
<aop:config>
<aop:aspect ref= "anyclasshavingAllAdviceMethod">
<!-- (all aop:before,aop:after-throwing etc) -->
</aop:aspect>
</aop:config>
is used for creating proxy . What is mechanism behind implementation of <aop:config>
or @Aspect
.
or load-time waever is used for these .
Note: to implement aop:config we don't have to provide any extra bean or load-time-weaver then how it works ?