Spring Cloud Alibaba與Spring Boot、Spring Cloud版本對應關系

一、前言

在搭建SpringCloud項目環境架構的時候,需要選擇SpringBootSpringCloud進行兼容的版本號,因此對于選擇SpringBoot版本與SpringCloud版本的對應關系很重要,如果版本關系不對應,常見的會遇見項目啟動不起來,怪異的則會是你的項目出現一些詭異的問題,查資料也不好查。下面就收集一下SpringBootSpringCloud版本之間的對應關系,在搭建項目框架或者學習時按照對應的版本區間進行選擇即可,避免走一些不必要的彎路。

1. 歷史版本圖

Release train Spring Boot compatibility

Spring Cloud Release Train

Spring Boot Version

Hoxton

2.2.x

Greenwich

2.1.x

Finchley

2.0.x

Edgware

1.5.x

Dalston

1.5.x

Camden

1.4.x

Brixton

1.3.x

Angle

1.2.x

注意: 官方通告SpringBoot1.5.x及以下版本官方不再提供維護了,建議開發者選擇使用SpringBoot2.0.x以上的版本,相對應的SpringCloud版本也最好不要使用。

二、查看版本關系

訪問Spring官方地址,可獲取SpringBootSpringCloud版本對應信息。

地址如下:

https://start.spring.io/actuator/info

在這里插入圖片描述
JSON格式如下:

JSON["bom-ranges"]["spring-cloud"]["Finchley.M9"]◣
Path:
JSON["bom-ranges"]["spring-cloud"]["Finchley.M9"]Key:
Finchley.M9: Copy deURI deBase64 aLine Copied!Modify
+Expand all -Collapse all Expand node Scroll to nodeShow value Show img Show array leng Show ico
JSON
git
commit
time2020-04-17T16:18:36Z
id7f707c1
branch7f707c17bed34a13b5bc9d5d58c71fc5a901c335
build
version0.0.1-SNAPSHOT
artifactstart-site
namestart.spring.io website
versions
initializr0.9.0.BUILD-SNAPSHOT
spring-boot2.2.6.RELEASE
groupio.spring.start
time2020-04-17T16:19:53.303Z
bom-ranges
azure
2.0.10Spring Boot >=2.0.0.RELEASE and <2.1.0.RELEASE
2.1.7Spring Boot >=2.1.0.RELEASE and <2.2.0.M1
2.2.0Spring Boot >=2.2.0.M1
codecentric-spring-boot-admin
2.0.6Spring Boot >=2.0.0.M1 and <2.1.0.M1
2.1.6Spring Boot >=2.1.0.M1 and <2.2.0.M1
2.2.1Spring Boot >=2.2.0.M1
solace-spring-boot
1.0.0Spring Boot >=2.2.0.RELEASE and <2.3.0.M1
solace-spring-cloud
1.0.0Spring Boot >=2.2.0.RELEASE and <2.3.0.M1
spring-cloud
Finchley.M2Spring Boot >=2.0.0.M3 and <2.0.0.M5
Finchley.M3Spring Boot >=2.0.0.M5 and <=2.0.0.M5
Finchley.M4Spring Boot >=2.0.0.M6 and <=2.0.0.M6
Finchley.M5Spring Boot >=2.0.0.M7 and <=2.0.0.M7
Finchley.M6Spring Boot >=2.0.0.RC1 and <=2.0.0.RC1
Finchley.M7Spring Boot >=2.0.0.RC2 and <=2.0.0.RC2
Finchley.M9Spring Boot >=2.0.0.RELEASE and <=2.0.0.RELEASE
Finchley.RC1Spring Boot >=2.0.1.RELEASE and <2.0.2.RELEASE
Finchley.RC2Spring Boot >=2.0.2.RELEASE and <2.0.3.RELEASE
Finchley.SR4Spring Boot >=2.0.3.RELEASE and <2.0.999.BUILD-SNAPSHOT
Finchley.BUILD-SNAPSHOTSpring Boot >=2.0.999.BUILD-SNAPSHOT and <2.1.0.M3
Greenwich.M1Spring Boot >=2.1.0.M3 and <2.1.0.RELEASE
Greenwich.SR5Spring Boot >=2.1.0.RELEASE and <2.1.14.BUILD-SNAPSHOT
Greenwich.BUILD-SNAPSHOTSpring Boot >=2.1.14.BUILD-SNAPSHOT and <2.2.0.M4
Hoxton.SR3Spring Boot >=2.2.0.M4 and <2.3.0.BUILD-SNAPSHOT
Hoxton.BUILD-SNAPSHOTSpring Boot >=2.3.0.BUILD-SNAPSHOT
spring-cloud-alibaba
2.2.0.RELEASESpring Boot >=2.2.0.RELEASE and <2.3.0.M1
spring-cloud-services
2.0.3.RELEASESpring Boot >=2.0.0.RELEASE and <2.1.0.RELEASE
2.1.7.RELEASESpring Boot >=2.1.0.RELEASE and <2.2.0.RELEASE
2.2.3.RELEASESpring Boot >=2.2.0.RELEASE and <2.3.0.M1
spring-statemachine
2.0.0.M4Spring Boot >=2.0.0.RC1 and <=2.0.0.RC1
2.0.0.M5Spring Boot >=2.0.0.RC2 and <=2.0.0.RC2
2.0.1.RELEASESpring Boot >=2.0.0.RELEASE
vaadin
10.0.17Spring Boot >=2.0.0.M1 and <2.1.0.M1
14.1.25Spring Boot >=2.1.0.M1
dependency-ranges
okta
1.2.1Spring Boot >=2.1.2.RELEASE and <2.2.0.M1
1.4.0Spring Boot >=2.2.0.M1
mybatis
2.0.1Spring Boot >=2.0.0.RELEASE and <2.1.0.RELEASE
2.1.2Spring Boot >=2.1.0.RELEASE
geode
1.2.6.RELEASESpring Boot >=2.2.0.M5 and <2.3.0.M1
1.3.0.M3Spring Boot >=2.3.0.M1 and <2.3.0.BUILD-SNAPSHOT
1.3.0.BUILD-SNAPSHOTSpring Boot >=2.3.0.BUILD-SNAPSHOT
camel
2.22.4Spring Boot >=2.0.0.M1 and <2.1.0.M1
2.25.1Spring Boot >=2.1.0.M1 and <2.2.0.M1
3.2.0Spring Boot >=2.2.0.M1

三、如何選擇SpringBoot與SpringCloud版本號

項目搭建初期,如何對SpringBootSpringCloud的一個相互兼容性版本號進行選擇,這是很重要的一步,例如SpringCloudHoxton.SR3這個版本,他對應的"Spring Boot >=2.2.0.M4 and <2.3.0.BUILD-SNAPSHOT"版本,意思就是如果選擇使用SpringCloudHoxton.SR3這個版本,那么SpringBoot的版本需要大于等于2.2.0小于2.3.0即可滿足兼容性。

1. 引入SpringCloud版本管理

官方提供了管理Spring Cloud 每個版本兼容的pom,引入下面依賴管理信息即可:

 <dependencyManagement><dependencies><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-dependencies</artifactId><version>Hoxton.SR3</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement>

2. 使用Spring Boot

Spring Boot可以也像父工程那樣管理自己內部的兼容版本號,如下:

<parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.2.5.RELEASE</version><relativePath/> <!-- lookup parent from repository -->
</parent>

四、SpringBoot、SpringCloud、SpringCloudAlibaba版本對應關系

由于Spring Cloud基于Spring Boot構建,而Spring Cloud Alibaba又基于Spring Cloud Common的規范實現,所以當我們使用``Spring Cloud Alibaba`來構建微服務應用的時候,需要知道這三者之間的版本關系。

下表整理了目前Spring Cloud Alibaba的版本與Spring BootSpring Cloud版本的兼容關系:

1. 畢業版本依賴關系(推薦使用)

Spring Cloud Version

Spring Cloud Alibaba Version

Spring Boot Version

Spring Cloud Hoxton.SR8

2.2.3.RELEASE

2.3.2.RELEASE

Spring Cloud Greenwich.SR6

2.1.3.RELEASE

2.1.13.RELEASE

Spring Cloud Hoxton.SR8

2.2.2.RELEASE

2.3.2.RELEASE

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.2.RELEASE

2.1.X.RELEASE

Spring Cloud Finchley

2.0.3.RELEASE

2.0.X.RELEASE

Spring Cloud Edgware

1.5.1.RELEASE(停止維護,建議升級)

1.5.X.RELEASE

五. Spring Cloud Alibaba與組件版本關系

Spring Cloud Alibaba是基于Spring Cloud Common的規范實現,而Spring Cloud Alibaba的各個微服務組件依賴于Spring Cloud Alibaba自身,因此我們需要知道Spring Cloud Alibaba與其自身微服務組件之間的版本關系。

下表整理了目前Spring Cloud Alibaba的版本與SentinelNacosRocketMQDubboSeata版本的兼容關系:

1. 組件版本關系

Spring Cloud Alibaba Version

Sentinel Version

Nacos Version

RocketMQ Version

Dubbo Version

Seata Version

2.2.3.RELEASE or 2.1.3.RELEASE or 2.0.3.RELEASE

1.8.0

1.3.3

4.4.0

2.7.8

1.3.0

2.2.1.RELEASE or 2.1.2.RELEASE or 2.0.2.RELEASE

1.7.1

1.2.1

4.4.0

2.7.6

1.2.0

2.2.0.RELEASE

1.7.1

1.1.4

4.4.0

2.7.4.1

1.0.0

2.1.1.RELEASE or 2.0.1.RELEASE or 1.5.1.RELEASE

1.7.0

1.1.4

4.4.0

2.7.3

0.9.0

2.1.0.RELEASE or 2.0.0.RELEASE or 1.5.0.RELEASE

1.6.3

1.1.1

4.4.0

2.7.3

0.7.1

六、依賴管理

Spring Cloud Alibaba BOM 包含了它所使用的所有依賴的版本。

1. RELEASE 版本

Spring Cloud Hoxton

如果需要使用 Spring Cloud Hoxton 版本,請在 dependencyManagement中添加如下配置

<dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-alibaba-dependencies</artifactId><version>2.2.3.RELEASE</version><type>pom</type><scope>import</scope>
</dependency>

然后在dependencies 中添加自己所需使用的依賴即可使用。

Spring Cloud Greenwich

如果需要使用 Spring Cloud Greenwich版本,請在 dependencyManagement中添加如下配置

<dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-alibaba-dependencies</artifactId><version>2.1.3.RELEASE</version><type>pom</type><scope>import</scope>
</dependency>

然后在 dependencies中添加自己所需使用的依賴即可使用。

Spring Cloud Finchley

如果需要使用 Spring Cloud Finchley版本,請在 dependencyManagement中添加如下配置

<dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-alibaba-dependencies</artifactId><version>2.0.3.RELEASE</version><type>pom</type><scope>import</scope>
</dependency>

然后在dependencies中添加自己所需使用的依賴即可使用。

Spring Cloud Edgware

如果需要使用 Spring Cloud Edgware 版本,請在 dependencyManagement中添加如下配置

<dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-alibaba-dependencies</artifactId><version>1.5.1.RELEASE</version><type>pom</type><scope>import</scope>
</dependency>

然后在 dependencies中添加自己所需使用的依賴即可使用。

2. 版本管理規范

項目的版本號格式為 x.x.x 的形式,其中 x 的數值類型為數字,從 0 開始取值,且不限于 0~9 這個范圍。項目處于孵化器階段時,第一位版本號固定使用 0,即版本號為 0.x.x 的格式。

由于 `Spring Boot 1 和 Spring Boot 2 在 Actuator 模塊的接口和注解有很大的變更,且 spring-cloud-commons 從 1.x.x 版本升級到 2.0.0 版本也有較大的變更,因此我們采取跟 SpringBoot 版本號一致的版本:

  • 1.5.x 版本適用于 Spring Boot 1.5.x
  • 2.0.x 版本適用于 Spring Boot 2.0.x
  • 2.1.x 版本適用于 Spring Boot 2.1.x
  • 2.2.x 版本適用于 Spring Boot 2.2.x

七、參考文檔

1.Spring-Cloud-Alibaba版本說明:https://github.com/alibaba/spring-cloud-alibaba/wiki/版本說明
3.SpringCloudAlibaba中文社區地址: https://github.com/alibaba/spring-cloud-alibaba/blob/master/README-zh.md
2.SpringCloud官方文檔: https://cloud.spring.io/spring-cloud-static/spring-cloud-gateway/2.2.1.RELEASE/reference/html/

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:
http://www.pswp.cn/web/70863.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/70863.shtml
英文地址,請注明出處:http://en.pswp.cn/web/70863.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

【含文檔+PPT+源碼】基于過濾協同算法的旅游推薦管理系統設計與實現

項目介紹 本課程演示的是一款基于過濾協同算法的旅游推薦管理系統設計與實現&#xff0c;主要針對計算機相關專業的正在做畢設的學生與需要項目實戰練習的 Java 學習者。 1.包含&#xff1a;項目源碼、項目文檔、數據庫腳本、軟件工具等所有資料 2.帶你從零開始部署運行本套…

MTK Android12 預裝apk可卸載

文章目錄 需求解決方法1、device/mediatek/mt6761/device.mk2、/vendor/mediatek/proprietary/frameworks/base/data/etc/pms_sysapp_removable_vendor_list.txt3、路徑&#xff1a;4、Android.mk 需求 近期&#xff0c;客戶需要預裝一個apk&#xff0c;同時該apk要可卸載。解…

從 0 到 1,用 Python 構建超實用 Web 實時聊天應用

從 0 到 1&#xff0c;用 Python 構建超實用 Web 實時聊天應用 本文深入剖析如何運用 Python 的 Flask 框架與 SocketIO 擴展&#xff0c;搭建一個功能完備的 Web 實時聊天應用。從環境搭建、前后端代碼實現&#xff0c;到最終運行展示&#xff0c;逐步拆解關鍵步驟&#xff0…

視頻字幕識別和翻譯

下載的視頻很多不是漢語的&#xff0c;我們需要用剪映將語音識別出來作為字幕壓制到視頻中去。 剪映6.0以后語音識別需要收費&#xff0c;但是低版本還是沒有問題。 如果想要非漢語字幕轉成中文&#xff0c;剪映低版本不提供這樣功能。但是&#xff0c;用剪映導出識別字幕&am…

每天一個Flutter開發小項目 (4) : 構建收藏地點應用 - 深入Flutter狀態管理

引言 歡迎回到 每天一個Flutter開發小項目 系列博客!在前三篇博客中,我們從零開始構建了計數器應用、待辦事項列表應用,以及簡易天氣應用。您不僅掌握了 Flutter 的基礎組件和布局,還學習了網絡請求、JSON 解析等實用技能,更重要的是,我們一起探討了高效的 Flutter 學習…

Visual Studio打開文件后,中文變亂碼的解決方案

文件加載 使用Unicode&#xff08;UTF-8&#xff09;編碼加載文件 C:\WorkSpace\Assets\Scripts\UI\View\ExecuteComplateView.cs時&#xff0c;有些字節已用Unicode替換字符替換。保存該文件將不會保留原始文件內容。

OpenGL ES -> GLSurfaceView繪制點、線、三角形、正方形、圓(頂點法繪制)

XML文件 <?xml version"1.0" encoding"utf-8"?> <com.example.myapplication.MyGLSurfaceViewxmlns:android"http://schemas.android.com/apk/res/android"android:layout_width"match_parent"android:layout_height"…

threejs 安裝教程

嗨&#xff0c;我是小路。今天主要和大家分享的主題是“threejs 安裝教程”。 在當今的數字化時代&#xff0c;用戶對視覺體驗的要求越來越高。傳統的2D網頁已經無法滿足所有需求&#xff0c;而三維&#xff08;3D&#xff09;圖形技術則為前端開發者提供了新的方向。…

win11編譯pytorch cuda128版本流程

Geforce 50xx系顯卡最低支持cuda128&#xff0c;torch cu128 release版本目前還沒有釋放&#xff0c;所以自己基于2.6.0源碼自己編譯wheel包。 1. 前置條件 1. 使用visual studio installer 安裝visual studio 2022&#xff0c;工作負荷選擇【使用c的桌面開發】,安裝完成后將…

如何安裝Vm和centos

一、VMware 安裝 &#xff08;一&#xff09;前期準備 下載 VMware 軟件&#xff1a;首先&#xff0c;你需要從 VMware 官方網站下載適合你計算機操作系統版本的 VMware Workstation 軟件安裝包。確保選擇的版本與你的主機操作系統兼容&#xff0c;例如&#xff0c;如果你的主…

OpenGL 04--GLSL、數據類型、Uniform、著色器類

一、著色器 在 OpenGL 中&#xff0c;著色器&#xff08;Shader&#xff09;是運行在 GPU 上的程序&#xff0c;用于處理圖形渲染管線中的不同階段。 這些小程序為圖形渲染管線的某個特定部分而運行。從基本意義上來說&#xff0c;著色器只是一種把輸入轉化為輸出的程序。著色器…

服務器離線部署DeepSeek

目標 本次部署的目標是在本地服務器上部署DeepSeek。但是該服務不能連接外網&#xff0c;因此只能使用離線部署的方式。為了一次完成部署。現在云服務器上進行嘗試。 云服務器部署嘗試 云服務器配置 CentOS72080Ti 11GB 安裝準備 1、上傳iso并配置為本地yum源 安裝前先將…

刪除idea recent projects 記錄

1、退出idea&#xff08;一定要全部退出idea&#xff0c;要不然刪除后&#xff0c;idea一退出&#xff0c;又保存上了&#xff09; 2、進入 C:\Users\Administrator\AppData\Roaming\JetBrains\IntelliJIdea2024.1\options 目錄 根據不同的版本號 IntelliJIdea2024.1 這個地方…

【MySql】EXPLAIN執行計劃全解析:15個字段深度解讀與調優指南

文章目錄 一、執行計劃核心字段總覽二、關鍵字段深度拆解1. type&#xff08;訪問類型&#xff09;——查詢性能的晴雨表典型場景分析&#xff1a; 2. key_len&#xff08;索引使用長度&#xff09;——索引利用率的檢測儀計算示例&#xff1a; 3. Extra&#xff08;附加信息&a…

如何實現一個 Spring Boot Starter

在 Spring Boot 中&#xff0c;Starter 是一種自動配置的模塊&#xff0c;它封裝了一些常用的功能&#xff0c;并通過 Spring Boot 的約定大于配置的原則&#xff0c;使開發者能夠快速使用和集成相關功能。通常&#xff0c;Spring Boot Starter 包含了所需的依賴、配置、自動化…

使用python做http代理請求

有這樣一個需求現在有兩臺A&#xff0c;B兩臺電腦組成了一個局域網&#xff0c;在A電腦上開發webjava應用&#xff0c;需要調用第三方接口做http請求&#xff0c;但是這個請求只能在B電腦上請求。 一種解決方案&#xff1a;自定義一個中間服務&#xff0c;在電腦B上運行一個簡…

系統架構設計師考點——嵌入式技術

一、備考指南 嵌入式技術主要考查的是嵌入式基礎知識、嵌入式設計等相關知識&#xff0c;在系統架構設計師的考試中選擇題占2~4分&#xff0c;案例分析有時會考關鍵路徑的技術問答&#xff0c;這個題目一般比較難&#xff0c;但是由于案例分析題是五題選三題&#xff0c;所以…

當AI重構認知:技術狂潮下的教育沉思錄

備注&#xff1a;文章未Deepseek R1模型輔助生成&#xff0c;如有不妥請諒解。 以下使原文&#xff1a; 我有三個娃&#xff0c;各間隔4到5歲&#xff0c;經歷過搜索引擎&#xff0c;短視頻&#xff0c;短劇&#xff0c;本身曾經也是教育專業出生&#xff0c;任何事務都有兩面性…

EasyExcel 實踐案例:打印工資條

文章目錄 &#x1f4a1; 1. 每個員工一個 Excel 文件? 占位符格式&#x1f4cc; Excel 模板&#x1f4cc; Java 代碼&#x1f525; 關鍵點 &#x1f4a1; 2. 每個員工一個 Sheet? 占位符格式&#x1f4cc; Java 代碼&#x1f525; 關鍵點 &#x1f4a1; 3. 一個 Sheet&#x…

編程題-從前序與中序遍歷序列構造二叉樹(中等-重點)

題目&#xff1a; 給定兩個整數數組 preorder 和 inorder &#xff0c;其中 preorder 是二叉樹的先序遍歷&#xff0c; inorder 是同一棵樹的中序遍歷&#xff0c;請構造二叉樹并返回其根節點。 提示: preorder 和 inorder 均 無重復 元素 解法一&#xff08;遞歸&#xff0…