当前位置:   article > 正文

Intellij Idea启动springboot报ClassNotFoundException

idea classnotfoundexception: org.springframework.boot.springapplication

Intellij Idea版本为Ultimate 2016.1, gradle版本为3.5,启动springboot报错

  1. java.lang.NoClassDefFoundError: org/springframework/boot/SpringApplication
  2. at com.some.fancy.name.Application.main(Application.java:13)
  3. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  4. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  5. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  6. at java.lang.reflect.Method.invoke(Method.java:498)
  7. at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
  8. Caused by: java.lang.ClassNotFoundException: org.springframework.boot.SpringApplication
  9. at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
  10. at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
  11. at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
  12. at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
  13. ... 6 more

首先排除了各种因依赖配置错误问题,各种百思不得其解。最后google搜到,原来是个bug。

It's a known issue in IntelliJ IDEA that is specific to Gradle 3.4 and later versions:

It's already fixed in IntelliJ IDEA 2017.1 and 2016.3.6.

You can also use Gradle 3.3 or older as a workaround if you can't or don't want to update IntelliJ IDEA.

原文地址:

https://stackoverflow.com/questions/42587487/noclassdeffounderror-after-intellij-idea-upgrade/42588061#42588061

 

解决办法,更新Intellij Idea至2016.3或者2017.1,要么使用3.3版本或者低于3.3版本的gradle。 

转载于:https://my.oschina.net/lock0818/blog/1575875

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/313410
推荐阅读
相关标签
  

闽ICP备14008679号