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>