美文网首页
idea spring项目maven工程 错误

idea spring项目maven工程 错误

作者: 蠢白的寄语 | 来源:发表于2019-11-28 11:57 被阅读0次

    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  改变一下镜像地址   

    不要用阿里云 不要用阿里云的镜像地址!!!

    相关文章

      网友评论

          本文标题:idea spring项目maven工程 错误

          本文链接:https://www.haomeiwen.com/subject/hzavwctx.html