Spring 之前运行的启动应用程序现在给出 NoClassDefFoundError
Spring Boot application which previously worked now gives NoClassDefFoundError
我正在尝试 运行 我的 Spring 启动应用程序但是出现此错误
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/boot/SpringApplication
at com.greglturnquist.learningspringboot2.learningspringboot2.LearningSpringBoot2Application.main(LearningSpringBoot2Application.java:12)
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
该应用程序之前可以正常工作,但我在安装更新后重新启动了我的 Mac。重启前一切都已保存。
我已经在 STS 上安装了 Gradle 插件,但注意到项目在 Project Explorer 中看起来像一个标准的 Java 项目,所以我再次安装了插件,现在应用程序运行了。
我正在尝试 运行 我的 Spring 启动应用程序但是出现此错误
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/boot/SpringApplication
at com.greglturnquist.learningspringboot2.learningspringboot2.LearningSpringBoot2Application.main(LearningSpringBoot2Application.java:12)
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
该应用程序之前可以正常工作,但我在安装更新后重新启动了我的 Mac。重启前一切都已保存。
我已经在 STS 上安装了 Gradle 插件,但注意到项目在 Project Explorer 中看起来像一个标准的 Java 项目,所以我再次安装了插件,现在应用程序运行了。