使用aop.xml在AspectJ中加载时间编织 [英] Load time weaving in AspectJ using aop.xml
本文介绍了使用aop.xml在AspectJ中加载时间编织的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
据我了解,为了使用aop.xml文件进行加载时编织,必须将其放置在META-INF中.有没有一种方法可以解决此问题,并在任何目录中使用aop.xml(或任何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.
推荐答案
您可以使用系统属性org.aspectj.weaver.loadtime.configuration
指向另一个AspectJ配置文件.例如:
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
这篇关于使用aop.xml在AspectJ中加载时间编织的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文