springCloud简介以及版本选型
springCloud简介
Spring cloud是⼀个基于Spring Boot实现的服务治理⼯具包,在微服务架构中⽤于管理和协调服务的
微服务:就是把⼀个单体项⽬,拆分为多个微服务,每个微服务可以独⽴技术选型,独⽴开发,独⽴部署,独⽴运维.并且多个服务相互协调,相互配合,最终完成⽤户的价值.
Spring Cloud是⼀系列框架的有序集合。它利⽤Spring Boot的开发便利性巧妙地简化了分布式系统基础设施的开发,如服务发现注册、配置中⼼、消息总线、负载均衡、断路器、数据监控等,都可以⽤Spring Boot的开发风格做到⼀键启动和部署Spring Cloud特点:
1:约定优于配置。
2:开箱即⽤、快速启动。
3:适⽤于各种环境。
4:轻量级的组件。
5:组件⽀持丰富,功能齐全。
优点:
1、可以按需伸缩
5、服务拆分粒度更细,有利于资源重复利⽤,有利于提⾼开发效率
2、可以更精准的制定优化服务⽅案,提⾼系统的可维护性
3、微服务架构采⽤去中⼼化思想,服务之间采⽤Restful等轻量级通讯,⽐ESB更轻量
4、适于互联⽹时代,产品迭代周期更短
缺点:
1、微服务过多,治理成本⾼,不利于维护系统
2、分布式系统开发的成本⾼(容错,分布式事务等)对团队挑战⼤
五⼤重要组件
服务发现——Netflix Eureka
客服端负载均衡——Netflix Ribbon/Feign
服务⽹关——Netflix Zuul
断路器——Netflix Hystrix
分布式配置——Spring Cloud Config
springCloud与SpringBoot版本对应关系:
官⽹版本对应:start.spring.io/actuator/info
"Finchley.M2": "Spring Boot >=2.0.0.M3 and <2.0.0.M5",
"Finchley.M3": "Spring Boot >=2.0.0.M5 and <=2.0.0.M5",
"Finchley.M4": "Spring Boot >=2.0.0.M6 and <=2.0.0.M6",
"Finchley.M5": "Spring Boot >=2.0.0.M7 and <=2.0.0.M7",
"Finchley.M6": "Spring Boot >=2.0.0.RC1 and <=2.0.0.RC1",
"Finchley.M7": "Spring Boot >=2.0.0.RC2 and <=2.0.0.RC2",
"Finchley.M9": "Spring Boot >=2.0.0.RELEASE and <=2.0.0.RELEASE",
"Finchley.RC1": "Spring Boot >=2.0.1.RELEASE and <2.0.2.RELEASE",
"Finchley.RC2": "Spring Boot >=2.0.2.RELEASE and <2.0.3.RELEASE",
"Finchley.SR4": "Spring Boot >=2.0.3.RELEASE and <2.0.999.BUILD-SNAPSHOT",
"Finchley.BUILD-SNAPSHOT": "Spring Boot >=2.0.999.BUILD-SNAPSHOT and <2.1.0.M3",
"Greenwich.M1": "Spring Boot >=2.1.0.M3 and <2.1.0.RELEASE",
"Greenwich.SR5": "Spring Boot >=2.1.0.RELEASE and <2.1.14.BUILD-SNAPSHOT",
"Greenwich.BUILD-SNAPSHOT": "Spring Boot >=2.1.14.BUILD-SNAPSHOT and <2.2.0.M4",
"Hoxton.SR3": "Spring Boot >=2.2.0.M4 and <2.3.0.BUILD-SNAPSHOT",
"Hoxton.BUILD-SNAPSHOT": "Spring Boot >=2.3.0.BUILD-SNAPSHOT"
2020springCloud版本选型:
maven
<!--spring boot2.2.2-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>spring系列框架有哪些
<version>2.2.2.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!--spring cloud Hoxton.SR1-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Hoxton.SR1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!--spring cloud alibaba 2.1.0.RELEASE-->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>                <version>2.1.0.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。