简体   繁体   中英

Load time weaving in AspectJ using aop.xml

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM