I am trying to configure Spring AOP without any XML and am wondering how to enable auto-proxing this way.
AutoProxyCreatorbean definition works, but is there an easier way?
Here is what my @Configuration looks like:
@Configuration public class Context { @Bean public AnnotationAwareAspectJAutoProxyCreator annotationAwareAspectJAutoProxyCreator() { return new AnnotationAwareAspectJAutoProxyCreator(); }; ... }
All other beans are scanned by AnnotationConfigApplicationContext .
Ckuck source share