一、介绍
Spring Cloud provides tools for developers to quickly build some of the common patterns in distributed systems (e.g. configuration management, service discovery, circuit breakers, intelligent routing, micro-proxy, control bus, one-time tokens, global locks, leadership election, distributed sessions, cluster state). Coordination of distributed systems leads to boiler plate patterns, and using Spring Cloud developers can quickly stand up services and applications that implement those patterns. They will work well in any distributed environment, including the developer’s own laptop, bare metal data centres, and managed platforms such as Cloud Foundry.
Features
Spring Cloud focuses on providing good out of box experience for typical use cases and extensibility mechanism to cover others:Spring cloud专注于为典型用例提供开箱即用体验,并涵盖其他扩展机制
-
Distributed/versioned configuration:配置中心
-
Service registration and discovery:服务注册与发现
-
Routing:智能路由
-
Service-to-service calls:服务调用
-
Load balancing:负载均衡
-
Circuit Breakers:容错机制
-
Global locks:全局锁
-
Leadership election and cluster state:Leader选举和集群管理
-
Distributed messaging:分布式消息
二、生态
三、版本确定
1、确定Spring CLoud和Spring boot对应版本关系: Spring Cloud
2、确定Spring cloud和Spring CLoud Alibaba对应版本关系: 版本说明 · alibaba/spring-cloud-alibaba Wiki · GitHub
2.1、确定Spring Cloud Alibaba和具体组件关系
3、确定Spring cloud和Spring CLoud Netflix对应版本关系: Spring Cloud 2021.0 Release Notes · spring-cloud/spring-cloud-release Wiki · GitHub
最终确定版本
版本管理pom依赖
<dependencyManagement>
<dependencies>
<!-- 引入spring cloud 版本管理 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>2021.0.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- 引入spring cloud alibaba 版本管理 -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>2021.0.4.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!--引入spring cloud netflix 版本管理-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix-dependencies</artifactId>
<version>3.1.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>