SpringAop中报如下错误:
Exception in thread "main"
org.springframework.beans.factory.BeanCreationException: 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
Caused by: java.lang.ClassNotFoundException: org.aopalliance.intercept.MethodInterceptor
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 26 more
Caused by: java.lang.ClassNotFoundException: org.aopalliance.intercept.MethodInterceptor
导致原因:
项目缺少aopalliance.jar
解决方案:
在项目中添加aopalliance.jar
下载地址: