Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accountService’ defined in class path resource [bean.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 ‘pt1’ while setting bean property ‘pointcut’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘pt1’: 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
先检查有没有导包,再检查所提示的
Exception encountered during context initialization - cancelling refresh
最新推荐文章于 2023-11-30 11:16:08 发布
本文探讨了Spring框架中AOP配置出现的问题,具体表现为在初始化过程中遇到异常,导致刷新尝试被取消。主要错误在于BeanPostProcessor实例化前发生失败,并深入分析了原因在于无法解析对bean ‘pt1’ 的引用。
600

被折叠的 条评论
为什么被折叠?



