问题
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