在配置AOP时,明明配置了切入点,却一直报错创建不了代理类。
报错描述:
Exception in thread “main” org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accountService’ 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.aspectj.AspectJPointcutAdvisor#0’: Cannot create inner bean ‘(inner bean)#69b0fd6f’ 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)#69b0fd6f’: Cannot resolve reference to bean ‘findAccount’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘findAccount’: 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 R e f l e c t i o n W o r l d E x c e p t i o n a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t A u t o w i r e C a p a b l e B e a n F a c t o r y . c r e a t e B e a n ( A b s t r a
spring5.0.2的AOP配置问题
最新推荐文章于 2022-03-31 10:45:52 发布