4-1 Spring Cloud Alibaba是什么
Spring Cloud Alibaba是什么?
- Spring Cloud 的子项目;
- 致力于提供微服务开发的一站式解决方案;
- 包含微服务开发的必备组件;
- 基于Spring Cloud,符合Spring Cloud标准;
- 阿里的微服务解决方案;
Spring Cloud:快速构建分布式系统的工具集;
4-2 版本与兼容性
- Spring Cloud版本命名
- Spring Boot语义化版本命名
<!--语义化的版本控制--> <!--2:主版本,第几代--> <!--1:次版本,一些功能的增加,但是架构没有太大的变化,是兼容的--> <!--5:增量版本,bug修复--> <!--release:里程碑,SNAPSHOT:开发版 M:里程碑 RELEASE:正式版-->
- Spring Cloud(常用了英国伦敦地铁站的名称来命名)首字母越靠后表示版本号越大,参考https://spring.io/projects/spring-cloud
- Spring Boot语义化版本命名
- Spring Cloud生命周期
- Spring Boot、Spring Cloud、Spring Cloud Alibaba的兼容性关系
-
Spring Cloud Release Train Spring Cloud Alibaba Boot Version Hoxton
2.2.x
Greenwich
0.9.0.RELEASE 2.1.x
Finchley
0.2.X.RELEASE 2.0.x
Edgware
0.1.X.RELEASE 1.5.x
Dalston
1.5.x
-
- 生产环境怎么选择版本?
- 坚决不用非稳定版本/end-of-life版本
- 尽量使用最新一代
- xxx.RELEASE版本缓一缓
- SR2之后一般可以放心使用
4-3 为项目整合Spring Cloud Alibaba
- 先整合Spring Cloud
- 再整合Spring Cloud Alibaba
<dependencyManagement>
<dependencies>
<!--整合spring cloud-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Greenwich.SR1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!--整合spring cloud alibaba-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>0.9.0.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>