【问题标题】:"Error: Could not find or load main class ${start-class} spring boot“错误:无法找到或加载主类 ${start-class} spring boot
【发布时间】:2019-11-28 00:03:22
【问题描述】:

尝试将应用程序作为 jar 运行后出现 Spring-Boot 错误。

【问题讨论】:

    标签: spring spring-boot


    【解决方案1】:

    这主要是因为您的项目中有两个主要类,您必须通过以下任一方式激活一个: 一个。删除主要课程,以便您只保留一个主要课程。 (如何在 IntelliJ 中识别带有 main() 的类--->>使用 Edit->find in path 然后搜索 main() 以轻松识别带有 main 方法的类) b. 转到您的 pom 文件并指定您要使用的 Main 类。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-10-10
      • 2018-12-19
      • 2021-12-18
      • 2016-04-20
      • 2016-06-12
      • 2016-03-16
      • 2016-01-03
      相关资源
      最近更新 更多