首页 > 代码库 > error at ::0 can't find referenced pointcut pointCutName 错误解决方法
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
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 = http://www.mamicode.com/"execution(* com.westsoft.kft.repairs.service.impl.*.*(..))")>上网查了,发现是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就解决了我的问题~
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。