<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # dependencyManagement > 顧名思義:**依賴的聲明與管理,并不會導致包的引入** > 在Maven多模塊的時候,管理依賴關系是非常重要的,各種依賴包沖突,查詢問題起來非常復雜,于是就用到了, ## **與dependencies區別:** 1) Dependencies相對于dependencyManagement,所有生命在dependencies里的依賴都會自動引入,并默認被所有的子項目繼承。 2) dependencyManagement里只是聲明依賴,并不自動實現引入,因此子項目需要顯示的聲明需要用的依賴。 3. **dependencyManagement:如果不在子項目中聲明依賴,是不會從父項目中繼承下來的**,只有在子項目中寫了該依賴項,并且沒有指定具體版本,才會從父項目中繼承該項,并且version和scope都讀取自父pom;另外如果子項目中指定了版本號,那么會使用子項目中指定的jar版本。 ## **示例說明** 在父模塊中: ~~~ <dependencyManagement> <dependencies> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.44</version> </dependency> </dependencies> </dependencyManagement> ~~~ 那么在**子模塊中**只需要` <groupId>`和`<artifactId> `即可,如: ~~~ <dependencies> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency> </dependencies> ~~~ **說明:** 1. 使用dependencyManagement可以統一管理項目的版本號,確保應用的各個項目的依賴和版本一致,不用每個模塊項目都弄一個版本號,不利于管理 2. 當需要變更版本號的時候只需要在父類容器里更新,不需要任何一個子項目的修改 3. 如果某個子項目需要另外一個特殊的版本號時,只需要在自己的模塊dependencies中聲明一個版本號即可。子類就會使用子類聲明的版本號,不繼承于父類版本號。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看