3
我已经将AspectJ CTW添加到了一个项目中,并且事情(出现)能够很好地工作。我可以在测试中运行代码,它演示了AspectJ拦截合适的方法。一旦我打包代码并将其部署到WAR中的WAR中,它就不再有效。AspectJ CTW织造除了部署的WAR之外随处可见?
我已经尝试了许多不同的东西,但似乎没有任何工作。我在Maven 2中使用Maven插件,并使用AspectJ的注释。所有的建设反馈表明它正在寻找方法和编织。
它为什么一旦部署到Tomcat就停止工作?
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.3</version>
<configuration>
<complianceLevel>1.6</complianceLevel>
<source>1.6</source>
<target>1.6</target>
<showWeaveInfo>true</showWeaveInfo>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>