使用AspectJ注解开发AOP应用时,会遇到以下问题:
::0 can't find referenced pointcut
这个问题,实际是与你所在的开发环境有关,如下表
jdk version | spring version | aspectjrt version and aspectjweaver version |
1.6 | 3.0 + | aspectjrt-1.6.2 and aspectjweaver-1.6.2 |
1.7 | 3.0 + | aspectjrt-1.7.3 and aspectjweaver-1.7.3 |
当环境为:
jdk 1.7, spring version is 3.0+, 如果使用aspectjrt-1.6.2 and aspectjweaver-1.6.2这个版本,就会出现上述错误,将aspectj and aspectjweaver 版本改为1.7.3 or more,问题得到解决。
试验步骤:
1. 将aspectj and aspectjweaver 版本改为1.6.2,运行结果:
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.6.2</version>
</dependency>
result :
2. 将aspectj and aspectjweaver 改为1.7.3 + 运行结果正常。
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.7.3</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.7.3</version>
</dependency>
转自 : http://tonydzl-2008.iteye.com/blog/2176653
相关推荐
spring-framework-3.1.1.RELEASE jdk1.7 环境下 can't find referenced pointcut 问题解决 换了对应的jar文件即可 aspectjrt.jar aspectj-1.6.6.jar aspectjweaver.jar
AspectJ shows its real power when combined with Spring. This new edition focuses on Spring-AspectJ integration, which is a major feature of Spring 2.5. Readers will find this edition immensely helpful...
com.springsource.org.aspectj.weaver-1.6.8.jar
spring-framework-3.1.1.RELEASE jdk1.7 环境下can't find referenced pointcut 问题的解决,程序程序无问题的情况下,更换jar文件即可。亲测可用!
Maven坐标:org.aspectj:aspectjweaver:1.9.7; 标签:aspectj、aspectjweaver、jar包、java、中英对照文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,...
AspectJ is a mature AOP implementation for Java, now integrated with Spring. AspectJ in Action, Second Edition is a fully updated, major revision of Ramnivas Laddad's best-selling first edition. It'...
Maven坐标:org.aspectj:aspectjweaver:1.9.7; 标签:aspectj、aspectjweaver、jar包、java、中文文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中...
基于XML的声明式AspectJ是指通过XML文件来定义切面、切入点及通知,所有的切面、切入点和通知都必须定义在<aop:config>元素内。 基于XML的声明式AspectJ <aop:config>元素及其子元素如下: 小提示:图中灰色部分标注...
spring 前置通知的相关jar包, 包括 com.springsource.org.aopalliance-1.0.0.jar 和 com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar
gradle-aspectj-binary:用于AspectJ二进制编织的Gradle插件
Eclipse AspectJ: Aspect Oriented Programming with AspectJ and the Eclipse ADT
AspectJ_sample 这是在Maven项目中使用AspectJ的示例。 AspectJLTWSample:加载时编织示例AspectJSample:编译时编织示例
gradle-kotlin-aspectj-weaver:一个Gradle插件,可让您使用AspectJ编织已编译的Java和Kotlin文件
Spring和AspectJ编译时的编织 Spring AOP的一个常见问题是获取Pointcut到达类的内部方法调用。 在这个示例中,您可以在一个简单的Spring Boot示例中看到如何使用AspectJ处理节拍时间编织。 示例场景 在此示例中,将...
AspectJ 电子书它将帮助您学习以兴趣为导向的 AspectJ 语言,该语言将 AOP 原则注入到 Java 编程语言以及随之而来的新结构中。 您可以在此处找到 PDF、ePub 和 Kindle 格式的本书内容: 。 第 1 部分:原则和方面J ...
In fact the growing interest in AOP can be attributed to the better available tools and this book teaches the reader everything they need to understand AOP and apply it successfully to their own ...
aspectj-1.6至1.8各发布版本jar包,解决错误日志:error the @annotation pointcut expression is only supported at Java 5 compliance level or above
spring中使用aop技术需要用到的aspectj包,另外还有一个aopalliance-1.0.jar我也上传了
Spring中Aspectj的配置和使用需要导入这个包,解决:“The import org.aspectj cannot be resolved”这个异常问题
1: 分析解释静态代理框架 AspectJ演变过程 2:增加AspectJ案例 3:分析AspectJ字节码