error at ::0 can't find referenced pointcut pointCutName 错误解决方法
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire method: public final void org.mybatis.spring.support.SqlSessionDaoSupport.setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate); nested exception is java.lang.IllegalArgumentException:
error at ::0 can't find referenced pointcut pointCutName
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:599)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:92)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:284)
... 65 more
Caused by: java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut pointCutName
今天在又一次复习Spring AOP的时候。使用aspectJ注解来实现Spring AOP时,用以下这样的方式来获得pointCut时报错了:
@Pointcut(value = "execution(* com.westsoft.kft.repairs.service.impl.*.*(..))")
public void pointCutName() { } @Before(value = "pointCutName()")
public void before(JoinPoint jp) {
System.out.println("before----------" + jp.getSignature().getName());
} @After(value = "pointCutName()")
public void after(JoinPoint jp) {
System.out.println("after-----------" + jp.getSignature().getName());
}
}
上网查了,发现是aspectjweaver-1.5.2.jar这个包版本号太低,于是去官网http://www.eclipse.org/aspectj/downloads.php下载了个最新版的替换
下载下来的aspectj-1.8.1里有4个jar包:aspectjrt.jar、aspectjtools.jar、aspectjweaver.jar和org.aspectj.matcher.jar
其余三个我也不知道有什么用,我仅仅替换了当中的aspectjweaver.jar就攻克了我的问题~
error at ::0 can't find referenced pointcut pointCutName 错误解决方法的更多相关文章
- ERROR: JDWP Unable to get JNI 1.2 environment的错误解决方法
在用java编程的时候,在debug模式下偶尔会出现下面的错误,jdk1.6.0-rc1: ERROR: JDWP Unable to get JNI 1.2 environment, jvm-> ...
- Error, some other host already uses address 192.168.0.202错误解决方法
Error, some other host already uses address 192.168.0.202错误解决方法 今天配置虚拟机网卡的时候遇到错误:Error, some other h ...
- xcode升级到6.0以后遇到的警告错误解决方法
Xcode 升级后,常常遇到的遇到的警告.错误,解决方法 从sdk3.2.5升级到sdk 7.1中间废弃了很多的方法,还有一些逻辑关系更加严谨了.1,警告:“xoxoxoxo” is depreca ...
- mac 上运行cassandra出现的java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: : : unknown error错误解决方法
mac 上运行cassandra出现的java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostExce ...
- 安裝jpeg-6b png error错误解决方法
安裝jpeg-6b png error错误解决方法 默认安裝jpeg-6b shell> wget ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar. ...
- Eclipse 出现Some sites could not be found. See the error log for more detail.错误 解决方法
Eclipse 出现Some sites could not be found. See the error log for more detail.错误 解决方法 Some sites could ...
- error: library dfftpack has Fortran sources but no Fortran compiler found解决方法
用pip install scipy 时提示 error: library dfftpack has Fortran sources but no Fortran compiler found 解决方 ...
- win7 、2008 提示Error 1606 Could Not Access Network Location %SystemDrive%/inetpub/wwwroot/ 的错误解决方法
在安装控件过程中出现提示Error 1606 Could Not Access Network Location %SystemDrive%/inetpub/wwwroot/ 的错误解决方法 1. 点 ...
- 安卓安装提示:Android SDK requires Android Developer Toolkit version 21.1.0 or above. (错误解决方法)
安卓安装提示:Android SDK requires Android Developer Toolkit version 21.1.0 or above. (错误解决方法) 主要是因为版本号不正确 ...
随机推荐
- ubuntu介绍以及使用
Ubuntu(友帮拓.优般图.乌班图)是一个以桌面应用为主的开源GNU/Linux操作系统,Ubuntu 是基于Debian GNU/Linux,支持x86.amd64(即x64)和ppc架构,由全球 ...
- SPOJ GSS3 Can you answer these queries III ——线段树
[题目分析] GSS1的基础上增加修改操作. 同理线段树即可,多写一个函数就好了. [代码] #include <cstdio> #include <cstring> #inc ...
- [luoguP2495] [SDOI2011]消耗战(DP + 虚树)
传送门 明显虚树. 别的题解里都是这样说的. 先不考虑虚树,假设只有一组询问,该如何dp? f[u]表示把子树u中所有的有资源的节点都切掉的最优解 如果节点u需要切掉了话,$f[u]=val[u]$ ...
- 算法复习——splay+启发式合并(bzoj2733-永无乡)
题目: Description 永无乡包含 n 座岛,编号从 1 到 n,每座岛都有自己的独一无二的重要度,按照重要度可 以将这 n 座岛排名,名次用 1 到 n 来表示.某些岛之间由巨大的桥连接,通 ...
- 为什么上传文件的表单里要加个属性enctype----摘录
上传文件的表单中<form>要加属性enctype="multipart/form-data",很多人只是死记硬背知道上传表单要这么写,知其然而不知其所以然.那到底为什 ...
- 常州模拟赛d4t2 陶陶摘苹果
题目描述 陶陶家的院子里有一棵苹果树,每到秋天树上就会结出 n 个苹果.苹果成熟的时候,陶陶就会 跑去摘苹果. 陶陶的手不能弯 (他仅能把手伸直),当且仅当陶陶达到的高度与苹果的高度相等的时候,陶陶 ...
- __new__ 与 __init__的区别
原文地址:http://www.cnblogs.com/ifantastic/p/3175735.html 单例模式 class Singleton(object): def __new__(cls, ...
- Codevs 1299 切水果 水一发
时间限制: 1 s 空间限制: 128000 KB 题目等级 : 大师 Master 题目描述 Description 简单的说,一共N个水果排成一排,切M次,每次切[L,R]区间的所有水果(可能有的 ...
- CodeForces 379D 暴力 枚举
D. New Year Letter time limit per test 1 second memory limit per test 256 megabytes input standard i ...
- 如何新建.htaccess文件
如何新建.htaccess文件 (1)新建文本文档,即txt文件: (2)把重写代码写进去: (3)然后选择[另存为],命名为.htaccess即可.