【问题标题】:Adding Spring Framework Support in IntelliJ - no such option在 IntelliJ 中添加 Spring 框架支持 - 没有这样的选项
【发布时间】:2019-10-06 18:51:58
【问题描述】:

所以,我有一个简单的 Maven 项目,我想添加 Spring 框架支持,主要是生成 Spring Config 文件。但是,在名为 Add Framework Support 的 IntelliJ 菜单中,我没有看到 Spring 选项 这是我的 pom.xml 文件:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>pl.javastart</groupId>
    <artifactId>spring-di-xml</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <maven.compiler.source>12</maven.compiler.source>
        <maven.compiler.target>12</maven.compiler.target>
        <spring-framework.version>5.0.6.RELEASE</spring-framework.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring-framework.version}</version>
        </dependency>
    </dependencies>


</project>

我尝试重新导入 Maven,但没有任何结果。 任何建议将不胜感激。

注意:这是终极版 2019.2.3 编辑: Spring 插件已激活。

面:

【问题讨论】:

  • 如果您对答案感到满意,请在下面查看我的答案并接受答案作为解决方案。

标签: java spring intellij-idea


【解决方案1】:

Spring 框架支持仅在 IDEA 终极版中可用。

此功能仅在 Ultimate 版本中受支持。

见:https://www.jetbrains.com/help/idea/spring-support.html

编辑: 转到插件并在左侧看到捆绑标题。检查那里是否停用了 Spring 工具。

【讨论】:

  • 他们是活跃的,列表在问题编辑中
  • 文件>项目结构> Facets 你在这里看到了什么?
  • 我在问题中添加了屏幕截图。我看到没有定义上下文的 Spring
  • 尝试删除该构面并单击 + 按钮并选择 Spring 并对其进行配置。如果它不起作用,请再次删除最后一个方面并尝试添加框架支持,检查是否有弹簧。
  • 删除(通过单击“-”,而不是删除)方面和添加框架支持工作正常。谢谢。
猜你喜欢
  • 2017-08-27
  • 2016-03-24
  • 2020-05-11
  • 2012-02-02
  • 1970-01-01
  • 2016-10-05
  • 1970-01-01
  • 1970-01-01
  • 2011-07-27
相关资源
最近更新 更多