关于Springboot、SpringCloud以及SpringCloud-Alibaba Nacos依赖问题

依赖关系

由于目前阿里的SpringCloud组件以及孵化成功,导致写项目导入pom依赖坐标时比较纠结,网上对版本的兼容介绍也变得五花八门。

SpringBoot和SpringCloud大版本对应关系

Spring Boot

Spring Cloud

1.2.x

Angel版本

1.3.x

Brixton版本

1.4.x stripes

Camden版本

1.5.x

Dalston版本、Edgware版本

2.0.x

Finchley版本

2.1.x

Greenwich.SR2

Alibaba组件版本关系

Spring Cloud Alibaba Version

Sentinel Version

Nacos Version

RocketMQ Version

Dubbo Version

Seata Version

(毕业版本) 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

(孵化器版本) 0.9.0.RELEASE or 0.2.2.RELEASE or 0.1.2.RELEASE

1.5.2

1.0.0

4.4.0

2.7.1

0.4.2

(孵化器版本) 0.2.1.RELEASE or 0.1.1.RELEASE

1.4.0

0.6.2

4.3.1

(孵化器版本) 0.2.0.RELEASE or 0.1.0.RELEASE

1.3.0-GA

0.3.0

SpringBoot、Cloud、Alibaba 毕业版本依赖关系(推荐使用)

Spring Cloud Version

Spring Cloud Alibaba Version

Spring Boot Version

Spring Cloud Hoxton

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

依赖管理

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

RELEASE 版本

  • Spring Cloud Hoxton
    如果需要使用 Spring Cloud Hoxton 版本,请在 dependencyManagement 中添加如下内容

    com.alibaba.cloud spring-cloud-alibaba-dependencies 2.2.0.RELEASE pom import
  • Spring Cloud Greenwich
    如果需要使用 Spring Cloud Greenwich 版本,请在 dependencyManagement 中添加如下内容

    com.alibaba.cloud spring-cloud-alibaba-dependencies 2.1.1.RELEASE pom import
  • Spring Cloud Finchley
    如果需要使用 Spring Cloud Finchley 版本,请在 dependencyManagement 中添加如下内容

    com.alibaba.cloud spring-cloud-alibaba-dependencies 2.0.1.RELEASE pom import
  • Spring Cloud Edgware
    如果需要使用 Spring Cloud Edgware 版本,请在 dependencyManagement 中添加如下内容

    com.alibaba.cloud spring-cloud-alibaba-dependencies 1.5.1.RELEASE pom import

Alibaba组件依赖坐标示例

以Nacos为例

		<dependency>
			<groupId>com.alibaba.cloud</groupId>
			<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.alibaba.cloud/spring-cloud-starter-alibaba-nacos-discovery -->
		<dependency>
			<groupId>com.alibaba.cloud</groupId>
			<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
		</dependency>

摘自 版本说明
更多孵化器版本对应可点击链接去官网查看

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值