Spring AOP jar包注意事项

具体报错信息如下:
Error creating bean with name 'c3p0' defined in class path resource [config/spring/spring-pool.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 'ermPoincCut' while setting bean property 'pointcut'; nested exception is org.springframework.beans.factory.BeanCreationException : Error creating bean with name 'ermPoincCut': Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/BCException

原因,Spring 3 之后的aspectj中没有再添加依赖的aspectjweaver包,所以需要手动配置pom或者自己下载一个,目前最新版本为1.8.9


		
			org.aspectj
			aspectjweaver
			1.8.9
		





你可能感兴趣的:(Spring)