所有内容都会编译,但会显示以下警告:
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]有人能解释一下它们的确切含义吗?
发布于 2012-08-07 22:33:30
这是您的编译时AspectJ编织过程的输出-它显示了您的代码库中还没有应用哪些AspectJ建议。
进一步扩展一下- Spring相关的方面通常在spring-aspects.jar文件的META-INF/aop.xml文件中定义,这些方面基于与代码库中匹配的切入点被编织到您的类中,如果某个切入点不匹配,例如,您可能在任何地方都没有任何@Async注释,那么建议不会被应用,您将看到advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecutionAspect has not been applied的消息
https://stackoverflow.com/questions/11848164
复制相似问题