Spring 使用 IntellijIdea 启动:自动完成在 pom.xml 中不起作用

Spring boot with IntellijIdea : auto complete not working in pom.xml

我是 Spring-bootMaven 的新手。我在向 pom.xml.

添加依赖项时遇到问题

我使用 Intellij IDEA,对于每个依赖项,我应该写完整的 <groupId> 和 <artifactId> 据我所知,我认为这不是个好主意!智能感知在 pom 文件中不起作用。

例如我想添加 jack-son 并且 Intellisense 只是自动创建没有价值的依赖块!但我需要帮助来填充 "artifactId",当我输入“j”时,我希望加载“jackson-dataformat-xml

我不知道如何在 pom.xml

中激活智能感知

Intellij 为此提供了实时模板功能。

在pom.xml中,写入dep并按tab键,它应该为依赖创建框架xml标签。

您还可以 add/edit 来自同一设置面板的模板。


我误解了问题。为了能够 auto-complete dependencies/jars 的名称,请从 Intellij 设置更新 Maven 存储库索引。

Intellij 根据本地存储库和 Maven 存储库索引建议这些依赖项的名称。