<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>

                ![字母哥博客](https://cdn.zimug.com/wx-zimug.png) 筆者已經寫過不少的實戰類的文章,經常會有人問我:“代碼是從你那里copy的,步驟也是按照你的方法做的,為什么報錯?”。如果再加上質問的語氣詞,就真的讓人非常討厭!同樣是九年義務教育,人教版課本,為什么有人上了985,而有的人卻在搬磚? 扯遠了,回歸正題。實際上一個程序是否能夠正確的運行,影響因素是方方面面的,最常規的因素就是代碼是否寫的正確。但除此之外,還有你的運行環境、版本兼容度、甚至編寫代碼的程序員的心態等等,都是影響程序能否正確運行的因素,而且非常重要。這一點在Spring Cloud微服務工程中體現的尤為明顯。 如果你使用了Spring Cloud 及 Spring Cloud Alibaba、Spring Boot,你該如何確定具體該使用哪一個版本?**本文就帶你從官網提煉一下:該如何確定版本號保證兼容性?重點體現一下這個思考過程,和官網中留下的版本選型依據信息** 筆者的版本號選型之路,遵循一個原則:**遵循官方建議的基礎上、盡量使用最新GA版(GA是指General Availability,正式發布版本)!** Why?大牛以前都告訴我們,選型不要用最新版的。新版的bug多,我現在還用java8呢。通常來說是這樣的,新版本功能性更強,老版本的穩定性更佳。 但Spring Cloud情況有點特殊,它是一個實實在在的“版本帝”,而且其組件的更新換代速度讓人瞠目結舌,社區的發展速度和活躍度都非常高,這就帶來一個問題,發展越快坑就越多,上一個版本的坑還沒填完,新版本新功能新特性就出來了。**所以很難去說:老版本維護時間長bug少,新版本的bug多。因此我們倒不如就盡量使用新版本,獲得更多的功能性提升。** > 以下截圖取自2020年3月15日,本文為作者原創,禁止轉載!日子特殊哈! ## 一、Spring Boot 版本 下面的截圖,截取自Spring Boot的github倉庫的wiki:[https://github.com/spring-projects/spring-boot/wiki](https://github.com/spring-projects/spring-boot/wiki),github中最新的版本是2.3,但wiki中明確說到2.2版本是目前正在支持維護的版本。 ![](https://img.kancloud.cn/f0/a0/f0a03001850f73a2263201592eea51ce_944x150.png) 這與Spring Boot官方網站中的說明是一致的,下圖截取自Spring Boot官方網站。 ![](https://img.kancloud.cn/85/53/8553a90573dd31598d6759491d8cbc31_1075x495.png) ## 二、Spring Cloud版本 Spring Cloud版本的版本號命名比較特殊,它是使用倫敦地鐵站的站名作為版本號的。從A、B、C、D、E,目前是Hoxton SR3版本(我們簡稱H版),SR是service releases的縮寫。 ![](https://img.kancloud.cn/e8/9b/e89b58a5919f4321885c3c5e944c11d4_1076x648.png) ## 三、兼容性基礎約束 在Spring Cloud官網的OverView預覽中[https://spring.io/projects/spring-cloud/#overview](https://spring.io/projects/spring-cloud/#overview),明確有如下信息: ![](https://img.kancloud.cn/02/00/02007a1cf5325dc6ceac4e4078524932_1022x366.png) 也就是說:如果你使用Spring Cloud Hoxton,Spring Boot版本就要使用2.2.x。如果你是老項目,使用的是Spring Cloud Greenwich,Spring Boot版本就要使用2.1.x。 我們可以通過訪問“/actuator/info”JSON服務端點,[https://start.spring.io/actuator/info](https://start.spring.io/actuator/info) ![](https://img.kancloud.cn/f7/d3/f7d37101c2064b2be216d87ed56d043a_904x242.png) 從以上的JSON響應信息中心,我們明確的看到:如果你是用Spring Cloud Hoxton,需要使用Spring Boot 2.2.0以上,2.2.6以下。如果你同時使用到了Spring cloud alibaba,Spring Boot 2.2.0以上,2.3.0以下。 ## 四、Spring Cloud Reference 最后我們來看一下Spring Cloud Reference文檔內部: [https://cloud.spring.io/spring-cloud-static/Hoxton.SR3/reference/html/spring-cloud.html](https://cloud.spring.io/spring-cloud-static/Hoxton.SR3/reference/html/spring-cloud.html) 開篇截圖: ![](https://img.kancloud.cn/b0/ef/b0ef54bef0263b1e9d781213ecf0bf75_1198x408.png) 所以我們最終選型是 |庫|版本| |----|----| |Spring Cloud|Hoxton SR3| |Spring Boot|2.2.5.RELEASE| ## 五、Spring Cloud Alibaba [spring-cloud-alibaba與spring-cloud和spring-boot之間的版本說明](https://github.com/alibaba/spring-cloud-alibaba/wiki/%E7%89%88%E6%9C%AC%E8%AF%B4%E6%98%8E) | Spring Cloud Version | Spring Cloud Alibaba Version | Spring Boot Version | | --- | --- | --- | | Spring Cloud Hoxton.SR3(選)| 2.2.1.RELEASE(選)| 2.2.5.RELEASE(選)| | Spring Cloud Hoxton.RELEASE| 2.2.0.RELEASE| 2.2.X.RELEASE| | Spring Cloud Greenwich | 2.1.1.RELEASE | 2.1.X.RELEASE| | Spring Cloud Finchley | 2.0.1.RELEASE| 2.0.X.RELEASE| | Spring Cloud Edgware | 1.5.1.RELEASE | 1.5.X.RELEASE |
                  <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>

                              哎呀哎呀视频在线观看