How does AspectJ's load-time-weaver find META-INF\\aop.xml?

吃可爱长大的小学妹 提交于 2019-12-04 11:25:10

The META-INF folder must be on the root of the classpath. And the META-INF folder must contain the file aop.xml.

For standalone programs, you must start the JVM with a weaving Java agent. For example:

-javaagent:pathto/aspectjweaver.jar

With Spring:

-javaagent:pathto/spring-agent.jar

You can find more information about it on AspectJ's Development Environment Guide.

If you use a web container, you have to configure the container to do the load-time weaving. SpringSource's reference guide shows you how to enable load-time weaving with Tomcat.

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