使用jdk1.7与spring 2.5 jar包冲突的解决

  在用到spring aop面向切面编程时,junit测试提示以下错误:


org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService'
defined in class path resource [applicationContext.xml]: Initialization of bean failed; 
nested exception is java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut myPointcut 

Caused by: java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut myPointcut 



后来发现实jdk版本和jar包版本的问题。我用的jdk是1.7,springjar包是2.5.6.后来aop相关 jar包改成aspectjweaver-1.7.4.jar和aspectj-1.7.4.jar后就没问题了。


提供下载链接:csdn;


ps:提供spring所有版本jar包下载链接:链接

おすすめ

転載: blog.csdn.net/Nick_zcy/article/details/52016724