中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Maven 配置打不同環境的版本包

發布時間:2020-08-04 03:24:47 來源:網絡 閱讀:1182 作者:IT達仁 欄目:大數據

     Maven 提供了豐富的插件,本文說明了maven 插件打包的步驟:

     pom.xml 文件如下:

<profiles>
   <!-- dev環境 -->
   <profile>
      <id>dev</id>
      <build>
         <filters>
            <filter>log4j.dev.properties</filter>
            <filter>params.dev.properties</filter>
         </filters>
         <resources>
            <resource>
               <directory>src/main/resources</directory>
               <includes>
                  <include>log4j.properties</include>
                  <include>params.properties</include>
                  <include>dictionary.properties</include>
               </includes>
               <filtering>true</filtering>
            </resource>
            <resource>
               <directory>src/main/resources</directory>
               <excludes>
                  <exclude>log4j.properties</exclude>
                  <exclude>params.properties</exclude>
               </excludes>
               <filtering>false</filtering>
            </resource>
         </resources>
      </build>
      <activation>
         <activeByDefault>true</activeByDefault>
         <property>
            <name>env</name>
            <value>dev</value>
         </property>
      </activation>
   </profile>
   
   <!-- pro環境 -->
   <profile>
      <id>pro</id>
      <build>
         <filters>
            <filter>log4j.pro.properties</filter>
            <filter>params.pro.properties</filter>
         </filters>
         <resources>
            <resource>
               <directory>src/main/resources</directory>
               <includes>
                  <include>log4j.properties</include>
                  <include>params.properties</include>
            <include>dictionary.properties</include>
               </includes>
               <filtering>true</filtering>
            </resource>
            <resource>
               <directory>src/main/resources</directory>
               <excludes>
                  <exclude>log4j.properties</exclude>
                  <exclude>params.properties</exclude>
               </excludes>
               <filtering>false</filtering>
            </resource>
         </resources>
      </build>
   </profile>
   
   <!-- uat環境 -->
   <profile>
      <id>uat</id>
      <build>
         <filters>
            <filter>log4j.uat.properties</filter>
            <filter>params.uat.properties</filter>
         </filters>
         <resources>
            <resource>
               <directory>src/main/resources</directory>
               <includes>
                  <include>log4j.properties</include>
                  <include>params.properties</include>
            <include>dictionary.properties</include>
               </includes>
               <filtering>true</filtering>
            </resource>
            <resource>
               <directory>src/main/resources</directory>
               <excludes>
                  <exclude>log4j.properties</exclude>
                  <exclude>params.properties</exclude>
               </excludes>
               <filtering>false</filtering>
            </resource>
         </resources>
      </build>
   </profile>
</profiles>
params.dev.properties 是指在項目里配置的開發環境數據鏈接
params.uat.properties 是指在項目里配置的測試環境數據鏈接
params.pro.properties 是指在項目里配置的生產環境數據鏈接


params.properties 是指上面三個指定的打包的數據鏈接



向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

临颍县| 屏山县| 古交市| 清苑县| 信阳市| 明光市| 苏尼特左旗| 武穴市| 诏安县| 秦皇岛市| 奎屯市| 泸州市| 桓台县| 黑山县| 镇康县| 常山县| 咸阳市| 如皋市| 河源市| 屏东县| 长泰县| 九江市| 镇平县| 天全县| 博乐市| 康乐县| 玛纳斯县| 外汇| 南康市| 仙游县| 济宁市| 金塔县| 武定县| 渝中区| 兴宁市| 青冈县| 库伦旗| 聂拉木县| 宣汉县| 虞城县| 天镇县|