idea spring项目maven工程 错误
Exception in thread "main" java.lang.IllegalArgumentException: Cannot instantiate interface org.springframework.boot.SpringApplicationRunListener : org.springframework.boot.context.event.EventPublishingRunListener
at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:439)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:418)
at org.springframework.boot.SpringApplication.getRunListeners(SpringApplication.java:404)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:292)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1242)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1230)
at cn.itcast.springboot.controller.HelloController.main(HelloController.java:20)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.context.event.EventPublishingRunListener]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/aop/framework/AopProxyUtils
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:182)
at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:435)
... 6 more
Caused by: java.lang.NoClassDefFoundError: org/springframework/aop/framework/AopProxyUtils
at org.springframework.context.event.AbstractApplicationEventMulticaster.addApplicationListener(AbstractApplicationEventMulticaster.java:109)
at org.springframework.boot.context.event.EventPublishingRunListener.<init>(EventPublishingRunListener.java:57)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:170)
... 7 more
Caused by: java.lang.ClassNotFoundException: org.springframework.aop.framework.AopProxyUtils
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 14 more
简单粗暴的解决方式 点卡这个
然后点开这个 看到发红的jar包 在你的maven 本地仓库删除这些jar包
如果下载下来还不行 就需要配置你的mavensetting.xml 改变一下镜像地址
不要用阿里云 不要用阿里云的镜像地址!!!