aop.xml name and location?

点点圈 提交于 2019-12-20 04:52:44

问题


Is there a way to specify the name of the aop.xml file with LTW? or define another name and location? I have several software modules that I use and that all use META-INF/aop.xml with different settings. I include these modules in a web application and then it all dependens how it's deployed/unpacked, which aop.xml file is used .. So I discovered after long time of searching that not all LTW weaving toke place correcting as it depends with aop.xml was used ...

Basically I need to use both aop.xml files, kinda of merging both contents of the aop.xml files...

How to do this? Ed


回答1:


When using AspectJ you can use the system property org.aspectj.weaver.loadtime.configuration to point to another config file. For example:

-D org.aspectj.weaver.loadtime.configuration=META-INF/myaop.xml



回答2:


Duplicate of Load time weaving in AspectJ using aop.xml.

Furthermore, the AspectJ documentation says:

When several configuration files are visible from a given weaving class loader their contents are conceptually merged.



来源:https://stackoverflow.com/questions/3736860/aop-xml-name-and-location

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!