SpringBoot与SpringCloud的版本对应详细版[通俗易懂]

SpringBoot与SpringCloud的版本对应详细版[通俗易懂]

大家好,又见面了,我是你们的朋友全栈君。

缘起初学spring cloud的朋友可能不知道,其实SpringBoot与SpringCloud需要版本对应,否则可能会造成很多意料之外的错误,比如eureka注册了结果找不到服务类啊,比如某些jar导入不进来啊,等等这些错误。下面列出来springBoot和spring cloud的版本对应关系,需要配套使用,才不会出现各种奇怪的错误。

关于maven仓库的版本列表spring-cloud-dependencies 版本列表可查看:

https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-dependencies

spring-boot-starter-parent 版本列表可查看:

https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent

版本对应关系大版本对应:

Spring Cloud

Spring Boot

Angel版本

兼容Spring Boot 1.2.x

Brixton版本

兼容Spring Boot 1.3.x,也兼容Spring Boot 1.4.x

Camden版本

兼容Spring Boot 1.4.x,也兼容Spring Boot 1.5.x

Dalston版本、Edgware版本

兼容Spring Boot 1.5.x,不兼容Spring Boot 2.0.x

Finchley版本

兼容Spring Boot 2.0.x,不兼容Spring Boot 1.5.x

Greenwich版本

兼容Spring Boot 2.1.x

Hoxtonl版本

兼容Spring Boot 2.2.x

在实际开发过程中,我们需要更详细的版本对应:

Spring Boot

Spring Cloud

1.5.2.RELEASE

Dalston.RC1

1.5.9.RELEASE

Edgware.RELEASE

2.0.2.RELEASE

Finchley.BUILD-SNAPSHOT

2.0.3.RELEASE

Finchley.RELEASE

2.1.0.RELEASE-2.1.14.RELEASE

Greenwich.SR5

2.2.0.M4

Hoxton.SR4

关于spring cloud1.x版本和2.x版本区别spring cloud各个版本之间是有所区别的,比如在SpringCloud中,1.X和2.X版本在pom.xml中引入的jar包名字都不一样,比如有的叫spirng-cloud-starter-hystrix 有的叫spring-cloud-netflix-hystrix,维护起来会比较困难。

1.x版本pom.xml里几个基本用到的jar长这样:

代码语言:javascript代码运行次数:0运行复制

4.0.0

com.joyce

joyce-test

1.0

jar

org.springframework.boot

spring-boot-starter-parent

1.5.9.RELEASE

org.springframework.cloud

spring-cloud-dependencies

Edgware.RELEASE

pom

import

UTF-8

org.springframework.cloud

spring-cloud-starter-feign

org.springframework.cloud

spring-cloud-starter-hystrix

org.springframework.cloud

spring-cloud-starter-zipkin

org.springframework.cloud

spring-cloud-starter-eureka

org.springframework.boot

spring-boot-starter-actuator

org.springframework.boot

spring-boot-starter-web

org.springframework.boot

spring-boot-starter-tomcat

org.springframework.boot

spring-boot-starter-jetty

org.springframework.cloud

spring-cloud-starter-ribbon

org.springframework.boot

spring-boot-starter-test

test

而在2.x版本中,比如我们需要eureka,去maven仓库中可能会看到deprecated, please use spring-cloud-starter-netflix-eureka-client这类提示,包括使用ribbon也会有

所以个人猜测2.x中统一用

spring-cloud-starter-netflix-xx 替换了原有的 spring-cloud-starter-xx(此处如有不正确请指出)

所以2.x的版本pom.xml类似如下这样

代码语言:javascript代码运行次数:0运行复制

4.0.0

com.forezp

service-feign

0.0.1-SNAPSHOT

jar

service-feign

Demo project for Spring Boot

com.forezp

sc-f-chapter3

0.0.1-SNAPSHOT

org.springframework.cloud

spring-cloud-starter-netflix-eureka-client

org.springframework.boot

spring-boot-starter-web

org.springframework.cloud

spring-cloud-starter-openfeign

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/131419.html原文链接:https://javaforall.cn

相关推荐

imac怎么设置u盘启动 如何设置iMac U盘启动
365沙巴体育入口

imac怎么设置u盘启动 如何设置iMac U盘启动

📅 06-30 👁️ 4387
dc品牌算什么档次(dc品牌算什么档次的衣服)
365速发国际平台app下载

dc品牌算什么档次(dc品牌算什么档次的衣服)

📅 07-03 👁️ 9046
摩拜单车官网优惠码,摩拜单车促销代码获得
365沙巴体育入口

摩拜单车官网优惠码,摩拜单车促销代码获得

📅 07-02 👁️ 2399
飙歌达人飙旗舰店,飙歌达人麦克风怎么样,家庭电视k歌套装
365彩票下载1.0.0老版本

飙歌达人飙旗舰店,飙歌达人麦克风怎么样,家庭电视k歌套装

📅 06-30 👁️ 1337
郑州给大家介绍几个站街的,人不少!
365彩票下载1.0.0老版本

郑州给大家介绍几个站街的,人不少!

📅 06-28 👁️ 6131
信用卡之王!郑爽晒的黑卡 你要符合什么条件才能办
365沙巴体育入口

信用卡之王!郑爽晒的黑卡 你要符合什么条件才能办

📅 06-30 👁️ 3707
病毒分析与手工查杀
365彩票下载1.0.0老版本

病毒分析与手工查杀

📅 06-29 👁️ 1084
临床试验常用缩写记不清?这有一份速查手册请收好!
365速发国际平台app下载

临床试验常用缩写记不清?这有一份速查手册请收好!

📅 06-27 👁️ 3936
APP推荐丨6款音乐制作必备软件,轻松做音乐
365彩票下载1.0.0老版本

APP推荐丨6款音乐制作必备软件,轻松做音乐

📅 06-30 👁️ 5208