1. 程式人生 > >Spring Aop 報錯error creating bean with name 'org.springframework.aop.config.internalAutoProxyCreator

Spring Aop 報錯error creating bean with name 'org.springframework.aop.config.internalAutoProxyCreator

使用Spring Aop程式設計除了要加入Spring的spring-aop jar包,還要加入aspectjrt.jar,aspectjweaver.jar,以及aopalliance_1.0.jar,否則報錯:

org.springframework.beans.factory.BeanCreationExcspring-aopeption: Error creating bean with name 'org.springframework.aop.config.internalAutoProxyCreator': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator]: Constructor threw exception;

nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor

aopalliance_1.0.jar下載地址: