spring aop的错误

<?xmlversion="1.0"encoding="UTF-8"?><beansxmlns="http://www.springframework.org/schem... <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd">
<bean id="audience" class="com.springinaction.springidol.Audience" />
<aop:config>
<aop:aspect id ="xxx" ref="audience">
<aop:before pointcut=
"execution(* com.springinaction.springidol.Performer.perform(..))"
method="takeSeats"/>

</aop:aspect>
</aop:config>
<bean id="performer" class="com.springinaction.springidol.Performer"/>
<bean id="userDao" class="dao.UserDao"/>
<bean id="userService" class="service.UserService">
<property name="userDao" ref="userDao"/>
</bean>
</beans>
我的配置

错误信息:
Error creating bean with name 'audience' defined in class path resource [spring-config.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)#17d22080' 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)#17d22080': Cannot create inner bean '(inner bean)#658981e0' of type [org.springframework.aop.aspectj.AspectJExpressionPointcut] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#658981e0': Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException
展开
 我来答
  • 你的回答被采纳后将获得:
  • 系统奖励15(财富值+成长值)+难题奖励30(财富值+成长值)
百度网友14f7e688aad
推荐于2016-11-03 · TA获得超过660个赞
知道小有建树答主
回答量:830
采纳率:0%
帮助的人:655万
展开全部
引入

<!-- aop -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>3.0.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.7.4</version>
</dependency>
本回答被提问者和网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
情缆震A
2014-09-16 · TA获得超过159个赞
知道小有建树答主
回答量:196
采纳率:0%
帮助的人:159万
展开全部
缺少aspectj的jar包
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式