Maven/Spring (3.2.11.RELEASE) プロジェクトでアスペクト シービングを使用しようとしています。プラグイン用にこれを構成しました …</p>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<configuration>
<complianceLevel>1.6</complianceLevel>
<aspectLibraries>
<aspectLibrary>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</aspectLibrary>
</aspectLibraries>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
これが私のアスペクトの依存関係です…</p>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.8.2</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.8.2</version>
</dependency>
しかし、「mvn clean install」を実行すると、これらの警告が表示されます…</p>
[INFO] --- aspectj-maven-plugin:1.7:compile (default) @ pd ---
[INFO] Showing AJC message detail for messages of types: [error, warning, fail]
[WARNING] advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch]
/Users/davea/.m2/repository/org/springframework/spring-aspects/3.2.11.RELEASE/spring-aspects-3.2.11.RELEASE.jar!org/springframework/scheduling/aspectj/AbstractAsyncExecutionAspect.class:58
[WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
/Users/davea/Dropbox/workspace/pd/org/springframework/mock/staticmock/AnnotationDrivenStaticEntityMockingControl.aj:83
[WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
/Users/davea/.m2/repository/org/springframework/spring-aspects/3.2.11.RELEASE/spring-aspects-3.2.11.RELEASE.jar!org/springframework/mock/staticmock/AbstractMethodMockingControl.class:190
[WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
/Users/davea/.m2/repository/org/springframework/spring-aspects/3.2.11.RELEASE/spring-aspects-3.2.11.RELEASE.jar!org/springframework/mock/staticmock/AbstractMethodMockingControl.class:199
これらの警告が消えるように依存関係を適切に解決するにはどうすればよいですか?
編集: これは、春の WEB-INF/dispatcher-servlet.xml ファイルで設定した構成です。プライベートメソッド @Transactional を作ろうとしています...
<bean class="org.springframework.transaction.aspectj.AnnotationTransactionAspect" factory-method="aspectOf">
<property name="transactionManager" ref="transactionManager"/>
</bean>
<tx:annotation-driven mode="aspectj" transaction-manager="transactionManager" />
<tx:advice id="txAdvice" >
<tx:attributes>
<tx:method name="generateAccess" propagation="REQUIRED"/>
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="orderServicePC" expression="execution(* org.mainco.subco.myproject.service.OrderService.*(..))" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="orderServicePC" />
</aop:config>