为什么 mvn build 没有过滤 application.yaml 中的资源

问题描述 投票:0回答:1

Pom.xml

<profile>
        <!-- Production mode is activated using -Pproduction -->
        <id>production</id>
        <properties>
            <toto>coucou</toto>
        </properties>
        <build>       
             <resources>
                <resource>
                    <directory>src/main/resources</directory>
                    <filtering>true</filtering>
                </resource>
            </resources>
        </build>
    </profile>

application.yaml

vaadin:
  productionMode: ${toto}

命令

 mvn clean package -Pproduction

结果:cat target/classes/application.yaml

vaadin:
   productionMode: ${toto}
maven vaadin
1个回答
0
投票

解决方案是application.yaml中的@toto@

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.