I have the following spring configuration:
This blog post explains it really well. Due to the fact that aspect singleton is created outside spring container you'd need to use factory-method=”aspectOf” that is only available after it is woven in by AspectJ ( not Spring AOP ) :
Notice factory-method=”aspectOf” that tells Spring to use a real AspectJ ( not Spring AOP ) aspect to create this bean. So that after the aspect is woven in it has an “aspectOf” method.
So that :
No matching factory method found: factory method 'aspectOf()' - That would mean that the aspect was not woven by AspectJ weaver.
From my experience with spring 3.1, if I don't use @Autowired but traditional setter for dependency injection, it gets injected and works as expected without aspectJ weaver. Although I'm encountering problems with the aspect being singleton... It results in 'perthis' instantiation model. .