为什么 profile.no-liquibase 和 profile.no-swagger 的 IntelliJ pom.xml 是红色的?

Why is IntelliJ pom.xml red for profile.no-liquibase and profile.no-swagger?

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

我该如何解决?

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

在pom.xml

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

Spring 配置文件示例 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