Error creating bean with name 'moocAspect' defined in class path resource ,这个是什么情况?

来源:5-4 Advice应用(上)

涅槃ing

2016-02-07 00:30

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'moocAspect' defined in class path resource [spring-aop-schema-advice.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)#1caabe71' 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)#1caabe71': Cannot resolve reference to bean 'moocPointcut' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'moocPointcut' is defined

写回答 关注

2回答

  • Owl_Tam
    2016-02-15 17:17:46
    已采纳

    get。set方法写了没

    藤原豆腐车

    已经搞定,加 <dependency> <groupId> org.aspectj</groupId > <artifactId> aspectjweaver</artifactId > <version> 1.8.7</version > </dependency>

    2016-04-17 16:15:40

    共 2 条回复 >

  • Monster_Z
    2016-07-09 09:43:56

    这老师讲课依赖aspectjweaver包也不讲一声

Spring入门篇

为您带来IOC和AOP的基本概念及用法,为后续高级课程学习打下基础

268785 学习 · 963 问题

查看课程

相似问题