• IDEA开发、测试、生产环境pom配置及使用


    pom文件

    一般放在最下面,project里

     <!--开发环境、测试环境、生产环境-->
        <!--生产环境-->
        <profiles>
            <profile>
                <id>dev</id>
                <activation>
                    <activeByDefault>true</activeByDefault>
                    <property>
                        <name>env</name>
                        <value>Dev</value>
                    </property>
                </activation>
                <build>
                    <resources>
                        <resource>
                            <directory>src/main/resources/dev</directory>
                        </resource>
                    </resources>
                </build>
            </profile>
    
            <!--开发环境-->
            <profile>
                <id>pro</id>
                <activation>
                    <property>
                        <name>env</name>
                        <value>Pro</value>
                    </property>
                </activation>
                <build>
                    <resources>
                        <resource>
                            <directory>src/main/resources/pro</directory>
                        </resource>
                    </resources>
                </build>
            </profile>
    
            <!--测试环境-->
            <profile>
                <id>test</id>
                <activation>
                    <property>
                        <name>env</name>
                        <value>Test</value>
                    </property>
                </activation>
                <build>
                    <resources>
                        <resource>
                            <directory>src/main/resources/test</directory>
                        </resource>
                    </resources>
                </build>
            </profile>
        </profiles>

    这个id是每一个profile的识别标识,其实应该画在每个profile里面的,就是觉得里面东西太多了不好看,请各位见谅

  • 相关阅读:
    LeetCode:Plus One
    LeetCode:Text Justification
    LeetCode:Sqrt(x)
    LeetCode:Climbing Stairs(编程之美2.9-斐波那契数列)
    LeetCode:Simplify Path
    LeetCode:Edit Distance
    LeetCode:Set Matrix Zeroes
    LeetCode:Search in Rotated Sorted Array I II
    LeetCode:Search a 2D Matrix
    LeetCode:Sort Colors
  • 原文地址:https://www.cnblogs.com/BigDataBugKing/p/11281238.html
Copyright © 2020-2023  润新知