From what I understand, for load time weaving to work using an aop.xml file, it must be placed in META-INF. Is there a way to get around this and use an aop.xml (or any xml file) in any directory? Thanks.
Weaving in AspectJ Classes are defined using Java syntax. The weaving process consists of executing the aspect advice to produce only a set of generated classes that have the aspect implementation code woven into it.
An aop. xml file contains two key sections: "aspects" defines one or more aspects to the weaver and controls which aspects are to be used in the weaving process; "weaver" defines weaver options and which types should be woven.
Weaving: linking aspects with other application types or objects to create an advised object. This can be done at compile time (using the AspectJ compiler, for example), load time, or at runtime.
You can use the system property org.aspectj.weaver.loadtime.configuration
to point to another AspectJ config file. For example:
-D org.aspectj.weaver.loadtime.configuration=META-INF/myaop.xml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With