Spring项目中用idea使用ProceedingJoinPoint类报错

idea使用ProceedingJoinPoint报错

Error:(18, 45) java: 无法访问org.aspectj.lang.ProceedingJoinPoint 找不到org.

信息: Using TestExecutionListeners: [org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@3fb6a447, org.springframework.test.context.support.DependencyInjectionTestExecutionListener@79b4d0f, org.springframework.test.context.support.DirtiesContextTestExecutionListener@6b2fad11, org.springframework.test.context.transaction.TransactionalTestExecutionListener@79698539, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@73f792cf]
九月 18, 2018 8:14:16 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [spring_aop/Spring-Config.xml]
九月 18, 2018 8:14:17 下午 org.springframework.context.support.GenericApplicationContext prepareRefresh
信息: Refreshing org.springframework.context.support.GenericApplicationContext@4439f31e: startup date [Tue Sep 18 20:14:17 GMT+08:00 2018]; root of context hierarchy
九月 18, 2018 8:14:17 下午 org.springframework.context.support.GenericApplicationContext refresh
警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService' defined in class path resource [spring_aop/Spring-Config.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0': Cannot create inner bean '(inner bean)#7a52f2a2' of type [org.springframework.aop.aspectj.AspectJMethodBeforeAdvice] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#7a52f2a2': Failed to introspect bean class [org.springframework.aop.aspectj.AspectJMethodBeforeAdvice] for lookup method metadata: could not find class that it depends on; nested exception is java.lang.NoClassDefFoundError: org/aspectj/lang/JoinPoint
九月 18, 2018 8:14:17 下午 org.springframework.test.context.TestContextManager prepareTestInstance
严重: Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@79b4d0f] to prepare test instance [spring_aop.Demo@527e5409]
java.lang.IllegalStateException: Failed to load ApplicationContext
	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124)
	at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83)
	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117)

错误原因:使用idea创建的Spring项目自动导包中缺少一个jar包,或者导入到包版本不匹配,
解决方法:导入一个jar包即可,
点击进入下载地,我有注明具体是哪个包
点击链接


导入包之后问题解决:

  • 4
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值