aspectj: How to weave aspects from a library into

2019-06-11 13:29发布

I have a library with some classes and a few aspects in it. Say AspectedLib.jar is the file that contains such definitions (created in eclipse, with "export jar file with aspectj support"). If I import the AspectedLib.jar file, and even use some of the classes defined in it, it works, but none of the joinpoints is triggered, i.e., the aspects are not executed.

How can I make this work? Ideally, how can I set this up in eclipse*?

* Version: Juno Service Release 2; Build id: 20130225-0426

1条回答
对你真心纯属浪费
2楼-- · 2019-06-11 14:24

You need to add the jar to your aspect path. In your Eclipse project preferences, go to AspectJ build -> Aspect Path and add the jar.

查看更多
登录 后发表回答