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.mzph.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…