Spring Boot與Spring Cloud版本嚴格來將,Boot是以數字作為版本,Cloud是以英語大寫字母開頭作為版本,這些其實都是倫敦地鐵站命名的版本。
github源碼地址:https://github.com/spring-projects/spring-boot/wiki
springboot2.0新特性:https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Release-Notes
從2019年10月份以后,Spring Boot2.0版本可以說是非常穩定了。從2020年開始,不推薦使用Spring Boot1.5版本了,推薦使用Spring Boot2.0版本或者更新。
從官網看SpringBoot版本:https://spring.io/projects/spring-boot#learn
使用最新版本就是最好的嗎?其實並不是這樣的,這需要與Spring Cloud版本相對應才行。
二、如何選擇Spring Cloud版本?
github源碼地址:https://github.com/spring-projects/spring-cloud/wiki,由於Spring Cloud源碼地址非常的懶,Spring Cloud GitHub上面不在進行維護了,如果讀者有興趣請看Spring Cloud官網:https://spring.io/projects/spring-cloud
springcloud版本命名規則:
Spring Cloud 采用了英國倫敦地鐵站的名稱來進行命名,並由地鐵站名稱字母A-Z以此類推的形式來發布迭代的版本。
Spring Cloud 是一個由許多子項目組成的綜合項目,各自項目有不同的發布節奏,為了管理 Spring Cloud 與各個子項目的版本依賴關系,發布了一個清單,其中包括了某個 Spring Cloud 版本對應的子項目版本。為了避免 Spring Cloud 版本號與子項目版本號混淆,Spring Cloud 版本采用了名稱而非版本號的命名,這些版本的名字采用了倫敦地鐵站的名字,根據字母表的順序來對應版本的時間順序。
例如 Angel 是第一個版本,Brixton 是第二個版本。當 Spring Cloud 的發布內容積累到臨界點或者一個重大的 Bug 被解決之后,會發布一個 “service releases”版本,簡稱 SRX 版本,比如 Greenwich.SR2 就是 Spring Cloud 發布的 Greenwich 版本的第二個 SRX 版本。
從官網看SpringCloud版本:https://spring.io/projects/spring-cloud#learn
三、Spring Cloud與Spring Boot之間的依賴關系如何查看
訪問官網地址:https://spring.io/projects/spring-cloud#overview,Spring Cloud和Spring Boot版本對應關系表格如下:
Spring Cloud Version | SpringBoot Version |
---|---|
Hoxton | 2.2.x |
Greenwich | 2.1.x |
Finchley | 2.0.x |
Edgware | 1.5.x |
Dalston | 1.5.x |
版本依賴關系:
-
Finchley 是基於 Spring Boot 2.0.x 構建的不再使用 Spring Boot 1.5.x。
-
-
Camden 構建於 Spring Boot 1.4.x,但依然能支持 Spring Boot 1.5.x。
所以說以前的A-D版本基本上不在推薦使用了,如果現在要使用 Spring Cloud 版本,個人覺得 Greenwich 版本還是比較穩定的,配合 Spring Boot 2.1.x 版本進行使用。
更詳細的版本對應查看方法:
瀏覽器訪問 https://start.spring.io/actuator/info 監控信息請求地址,如果剛開始查看 JSON 串返回結果看不懂,個人推薦在谷歌瀏覽器擴展程序下載一個叫 JSONView 插件。非常的好用,該插能夠自動識別 JSON 請求數據格式。
我們一起來看一下效果吧: