我正在尝试为 spring boot 应用程序创建运行配置,但 Intellij 找不到 spring boot 应用程序的主类(通常它会自动填充)。我尝试通过搜索项目结构来添加类,但 Intellij 不允许我将该应用程序的主文件添加到配置的“主类”中。我怎样才能让 Intellij 检测到这个类?
项目目录:
rootfolder
> springBootBackEnd
> angularUI
我将模块设置为“rootfolder”,内容根目录是 rootfolder
原文由 matchi 发布,翻译遵循 CC BY-SA 4.0 许可协议
问题可能是您的 IDEA 项目文件配置不当。
关闭 IDEA,删除所有 .idea 文件并重新导入项目。