2012-08-07 47 views
1

一切編譯,但會顯示這些警告:Spring MVC的項目編譯警告

Warning: advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch] 

Warning: advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch] 

Warning: advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied [Xlint:adviceDidNotMatch] 

Warning: advice defined in org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect has not been applied [Xlint:adviceDidNotMatch] 

有人能解釋究竟是什麼意思呢?

回答

4

這是您的編譯時AspectJ編織過程的輸出 - 它向您展示哪些AspectJ建議尚未應用於您的代碼庫中。

要進一步擴展這些 - Spring相關方面通常在spring-aspects.jar文件中的META-INF/aop.xml文件中定義,並且這些方面根據代碼庫中匹配的切入點編入您的類中,如果一些切入點不匹配,例如,您可能沒有任何地方的任何註釋,那麼建議不會被應用,並且您將看到消息advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied

+0

Exhaustively。謝謝! – 2012-08-07 14:46:15