java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut
来源:互联网 发布:淘宝网书籍杂志在哪找 编辑:程序博客网 时间:2024/05/19 09:15
java.lang.IllegalArgumentException: error at ::0 can’t find referenced pointcut
我在用注解实现spring的AOP时遇到这个异常,提示无法找到切点,检查代码没有发现问题。
我的项目的jdk为1.7.0_07,解决办法是将项目的Jre改为jdk1.6; 然后程序运行正常了。
核心代码:
import org.aspectj.lang.JoinPoint;import org.aspectj.lang.annotation.After;import org.aspectj.lang.annotation.AfterReturning;import org.aspectj.lang.annotation.Aspect;import org.aspectj.lang.annotation.Before;import org.aspectj.lang.annotation.Pointcut;import org.springframework.stereotype.Component;@Component("transaction")@Aspectpublic class Transaction { @Pointcut("execution(* cn.spring.spring_proxy.aop.annotation.PersonDaoImpl.*(..))") public void persoDao() { } // 前置通知 @Before("personDao()") public void beginTransaction(JoinPoint jointPoint) { System.out.println(jointPoint.getArgs()); String methodName = jointPoint.getSignature().getName(); System.out.println(methodName); System.out.println("beginTransaction"); } // 后置通知 @AfterReturning(pointcut = "personDao()", returning = "val") public void commit(JoinPoint joinPoint, Object val) { System.out.println(joinPoint.getArgs()); String methodName = joinPoint.getSignature().getName(); System.out.println("commit"); } // 最终通知 @After("personDao()") public void finallyMethod() { System.out.println("finaly method"); }}
希望能对你有帮助。
0 0
- Spring java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut ad
- java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut
- Caused by: java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut
- 解决:“java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut myMethod”问题!
- Caused by: java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut
- java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut
- java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut
- java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut myMethod
- Caused by: java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut poin_
- 解决:“java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut myMethod”问题!
- Caused by: java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut
- Spring AOP 异常:IllegalArgumentException: error at ::0 can't find referenced pointcut
- spring aop 学习小插曲 IllegalArgumentException: error at ::0 can't find referenced pointcut xx
- Spring Aop包版本不对应IllegalArgumentException: error at ::0 can't find referenced pointcut point_cut
- error at ::0 can't find referenced pointcut...解决方法
- error at ::0 can't find referenced pointcut mymethod
- error at ::0 can't find referenced pointcut..
- error at ::0 can't find referenced pointcut allAddMet解决方案
- [必藏]Android 最棒的开源集合库
- 淮安身份证号码户籍地址信息查询
- Python 主要模块和常用方法简览
- pylab + random demo
- 有关音频编码的知识与技术参数
- java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut
- HDU 2087 剪花布条
- HTML5新增主体标签
- 二叉排序树的删除
- 求2个数的最大公约数
- 初学Ext Js 5之一 -----Ext JS 5 的开发环境配置
- requirejs中非AMD规范js的加载
- 涟水手机GPS卫星定位追踪找人
- Nuget工具的安装和实际项目基本用法