Sample resource
mvn clean package
mvn -X clean package -P prod
mvn  package -P prod

java -jar boot-react-0.0.1-SNAPSHOT.jar --spring.profiles.active=prod


#父子工程的化，指定配置文件和工程，profiles写在最外层
mvn clean package -pl service-system-cache -P prod



使用maven的resource filter可以实现多场景切换。

<profiles>
    <profile>
        <id>prod</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <properties>
            <build.profile.id>prod</build.profile.id>
        </properties>
    </profile>
    <profile>
        <id>dev</id>
        <properties>
            <build.profile.id>dev</build.profile.id>
        </properties>
    </profile>
</profiles>

<build>
        <filters>
            <filter>application-${build.profile.id}.properties</filter>
        </filters>

        <resources>
            <resource>
                <filtering>true</filtering>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
</build>

mvn clean package -Dmaven.test.skip=true -P prod
mvn package  -pl service-system-cache -P dev -Dmaven.test.skip=true