spring-AOP编程出现org.springframework.beans.factory.BeanCreationException

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_22498277/article/details/51591896

若你的项目出现如下异常:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService' defined in class path resource [beans.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0': Cannot resolve reference to bean 'pointcut' while setting bean property 'pointcut'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pointcut': Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException


问题出现原因及解决方法:

没有导入aspectjweaver-1.7.1.jar的jar包,在项目中导入即可


猜你喜欢

转载自blog.csdn.net/qq_22498277/article/details/51591896