【问题标题】:Creating an empty project and add new modules of Micronaut project in intellj gradle is not working在 intellij gradle 中创建一个空项目并添加 Micronaut 项目的新模块不起作用
【发布时间】:2020-09-29 13:35:06
【问题描述】:

我正在从 Spring Boot 切换到 Micronaut 应用程序。但是当我使用 IntelliJ IDE 在空项目中添加模块时,IntelliJ 2020.2.2 不支持 Gradle 构建。

我的项目结构如下

gradle build 应该出现在 IDE 的右侧,但不是

即使在运行配置中我也看不到项目

我可以看到两个项目的 build.gradle 文件

【问题讨论】:

标签: java intellij-idea micronaut


【解决方案1】:

确保您在 Preferences | 中启用了 Gradle 捆绑插件插件。然后你可以通过 File | 添加一个 Gradle 模块。新 |模块形式 Existing Sources 并选择要从中导入的 build.gradle 文件,请参阅Import an existing module to the project

【讨论】:

  • 单个项目的情况并非如此,因为单个项目 Gradle 工作正常。这是我们在工作区中添加多个项目的时候。
  • 是的,我启用了 Gradle 插件,多个模块无法与 Micronaut 项目一起使用,但是对于 Spring Boot 应用程序,它可以正常工作
  • 您可以从 build.gradle 文件上下文菜单中将现有项目导入为 gradle -> 导入为 Gradle 项目。另见jetbrains.com/help/idea/gradle.html#link_gradle_project
猜你喜欢
  • 2019-08-07
  • 1970-01-01
  • 2016-01-30
  • 2022-08-09
  • 1970-01-01
  • 1970-01-01
  • 2020-10-30
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多