Load time weaving in AspectJ using aop.xml

心已入冬 提交于 2019-12-10 13:36:42

问题


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.


回答1:


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


来源:https://stackoverflow.com/questions/3314953/load-time-weaving-in-aspectj-using-aop-xml

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