首页 > 解决方案 > 在将 firebase-admin 添加到 Spring Boot App 的 build.gradle 后,无法在 Eclipse Run/Debug 中找到或加载主类

问题描述

我有一个由 JHipster 生成的 Spring Boot 应用程序。它工作正常,但在 Gradle 构建文件中添加 firebase-admin 依赖项后,我无法在 Eclipse 中运行或调试此应用程序。 The error is 'Could not find or load main class' caused by 'java.lang.ClassNotFoundException'. 缺少的类是我在 Eclipse 中单击的带注释的 SpringBootApplication 类。

如果我从命令行或 Eclipse 启动 Gradle 或将应用程序部署到云但在 Eclipse 中没有“调试为”,则应用程序将运行,我无法使用热代码替换进行开发。

当我删除依赖项时,Eclipse 中的“运行/调试方式”工作正常。我需要此依赖项才能连接到 Firebase Firestore。

标签: eclipsefirebasespring-bootgradlejhipster

解决方案


推荐阅读