使用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下载地址:
http://mirrors.ibiblio.org/pub/mirrors/maven2/aopalliance/aopalliance/1.0/