【问题标题】:Why is IntelliJ pom.xml red for profile.no-liquibase and profile.no-swagger?为什么 IntelliJ pom.xml 对于 profile.no-liquibase 和 profile.no-swagger 是红色的?
【发布时间】:2018-04-12 12:36:09
【问题描述】:

为什么我在 IntelliJ 中的 pom.xml 中的设置是红色的?

我该如何解决?

【问题讨论】:

  • 红色的设置在哪里定义?
  • 对不起,我问了愚蠢的问题。现在在属性中定义:-)
  • 什么属性?系统属性?请说明它们是如何定义的
  • 在 pom.xml 中,您可以在 中添加属性。此外,我使用 IntelliJ,在 Maven 项目选项卡中,您可以选择不同的配置文件,这些可以控制您的变量。
  • 所以显示它在 中定义的部分......如果您发布不完整的信息,它没有帮助

标签: maven spring-boot intellij-idea swagger liquibase


【解决方案1】:

我使用 IntelliJ,设置在 maven 配置文件中定义

在 pom.xml 中

   ...
   <profiles>
    <profile>
        <id>no-liquibase</id>
        <properties>
            <profile.no-liquibase>,no-liquibase</profile.no-liquibase>
        </properties>
    </profile>
   ...

弹簧剖面示例https://www.mkyong.com/spring/spring-profiles-example/

Maven 配置文件示例https://www.mkyong.com/maven/how-to-create-user-defined-properties-in-maven/

在我的 IDE 中选择它们并重建项目,它已经为我解决了。

mvn clean install

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-02-23
    • 2018-06-08
    • 2019-07-12
    • 2021-04-15
    • 2022-11-17
    • 1970-01-01
    • 2019-05-12
    • 2021-02-02
    相关资源
    最近更新 更多