Why Spring AOP is not weaving external jars at runtime?

前端 未结 6 945
醉话见心
醉话见心 2020-12-29 14:46

I have a java application build upon Spring 3. This project has another jar as a dependency.

This dependency contains a @org.aspectj.lang.annotation.Aspect

6条回答
  •  灰色年华
    2020-12-29 15:11

    From AspectJ in action book: aspects used with the proxy-based AOP (declared using @AspectJ or XML-based syntax) are Spring beans and shouldn’t use the aspectOf() approach to instantiation.

    Declare it normally and see if it works out:

    
      
    
    

提交回复
热议问题