Spring 学习时遇到的错误:java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$Reflectio

来源:互联网 发布:it学什么好 编辑:程序博客网 时间:2024/06/06 04:01
本来照着书上敲的好好的,可是一到运行就报错,一看错误这么一大长串傻眼了,直接copy百度,结果也没解决,没办法只好慢慢看最后确定了是由于缺少jar包导致的问题。Spring在3.0之后就不再一同发布依赖包,因为大家可以通过Maven搞定依赖问题,但如果要自己导的话就得去下载对应的:aspectjweaver.jar 包附,下载链接:[http://central.maven.org/maven2/org/aspectj/aspectjweaver/1.8.10/aspectjweaver-1.8.10.jar\](http://central.maven.org/maven2/org/aspectj/aspectjweaver/1.8.10/aspectjweaver-1.8.10.jar](http://central.maven.org/maven2/org/aspectj/aspectjweaver/1.8.10/aspectjweaver-1.8.10.jar%5D%28http://central.maven.org/maven2/org/aspectj/aspectjweaver/1.8.10/aspectjweaver-1.8.10.jar)附,错误详情: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'product' defined in class path resource [context.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)#67b467e9' 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)#67b467e9': Cannot resolve reference to bean 'pointcut' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pointcut': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.aop.aspectj.AspectJExpressionPointcut]: No default constructor found; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException希望能帮到大家
阅读全文
0 0
原创粉丝点击