Aspectj: intercept method from external jar
问题 I am using a X.jar and adding to my AspectJ project(in eclipse). I have written pointcut and advice for a method myMethod() inside X.jar. But aspectj is not intercepting this method call. How can I tell aspectj to intercept method calls on external jars.Or is it not possible? Thanks 回答1: There are two options: a) compile the aspects into the JAR b) use load time weaving (I'd go with that one) Both of these are advanced topics, I'd suggest you read AspectJ in Action (2nd Ed) by Ramnivas Laddad