[问题] spring boot 新手

楼主: chiang0514 (chiang0514)   2018-05-03 19:57:06
https://start.spring.io/
请问官网生出的专案怎都无法执行呢?
idea 生出来的专案也一样无法执行
错误讯息是
Exception in thread "main" java.lang.NoClassDefFoundError:
org/springframework/boot/SpringApplication
at com.example.demo.DemoApplication.main(DemoApplication.java:10)
Caused by: java.lang.ClassNotFoundException:
org.springframework.boot.SpringApplication
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)
... 1 more Process finished with exit code 1
似乎是找不到 SpringApplication.run
请问这问题该怎解呢?
作者: hate9527 (......)   2018-05-04 10:13:00
java.lang.NoClassDefFoundError
作者: zephyrhymn   2018-05-04 11:02:00
看起来就专案环境设定哪里出错了...无法编译导致要执行该class却找不到
作者: violet90079 (ˊ__>ˋ)   2018-05-05 16:55:00
ClassNotFound就要放(jar档)啊
作者: jimfan (jimfan)   2018-05-12 17:14:00
可以post你的pom.xml看看如果你用maven,先行一次maven update,确保IDE下载有关的jar档,包括Spring

Links booklink

Contact Us: admin [ a t ] ucptt.com