2

SpringCloud 2020版本教程0:springcloud 2020版本概述

 3 years ago
source link: https://www.fangzhipeng.com/springcloud/2021/04/01/sc-2020-gs.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
SpringCloud 2020版本教程0:springcloud 2020版本概述

Spring cloud赶在2020年最后几天发布了新版本,版本号取名为2020.0.0,取消了英国地铁的命名方式。从H版本之后,全新的命名为2020.x.x。马上快2021年了,为毛不取名为2021 ,哈哈。

从maven仓库可知,当前版本为2020.0.2, sc2020-01.png

Release Train Boot Version spring cloud alibaba version 2020.0.x aka Ilford 2.4.x 2021.1 Hoxton 2.2.x, 2.3.x (Starting with SR5) 2.2.x Greenwich 2.1.x 2.1.x Finchley 2.0.x 2.0.x Edgware 1.5.x 1.5.x Dalston 1.5.x 1.5.x

spring cloud最大的变化就是移除了spring cloud netflix模块,仅仅包括了eureka模块。

As announced, the following modules have been removed from spring-cloud-netflix:

  • spring-cloud-netflix-archaius
  • spring-cloud-netflix-concurrency-limits
  • spring-cloud-netflix-core
  • spring-cloud-netflix-dependencies
  • spring-cloud-netflix-hystrix
  • spring-cloud-netflix-hystrix-contract
  • spring-cloud-netflix-hystrix-dashboard
  • spring-cloud-netflix-hystrix-stream
  • spring-cloud-netflix-ribbon
  • spring-cloud-netflix-sidecar
  • spring-cloud-netflix-turbine
  • spring-cloud-netflix-turbine-stream
  • spring-cloud-netflix-zuul
  • spring-cloud-starter-netflix-archaius
  • spring-cloud-starter-netflix-hystrix
  • spring-cloud-starter-netflix-hystrix-dashboard
  • spring-cloud-starter-netflix-ribbon
  • spring-cloud-starter-netflix-turbine
  • spring-cloud-starter-netflix-turbine-stream
  • spring-cloud-starter-netflix-zuul

既然把Netflix组件remove掉了,那么需要有替代方案,Spring Cloud团队给我们推荐了用于替代的产品:

Netflix 推荐替代品 说明 Hystrix Resilience4j 、sentinel 建议使用sentinel Hystrix Dashboard / Turbine Micrometer + Monitoring System\sentinel dashboard   Ribbon Spring Cloud Loadbalancer 建议使用sentienl dashboard spring 自己的产品 Zuul 1 Spring Cloud Gateway spring自己的产品 Archaius 1 Spring Boot外部化配置 + Spring Cloud配置 比Netflix实现的更好、更强大

其他变化

默认情况下,不再启用spring-cloud-commons提供的Bootstrap。 如果您的项目需要它,则可以通过属性或新的启动器重新启用它。

要通过属性重新启用,请设置spring.cloud.bootstrap.enabled = true或spring.config.use-legacy-processing = true。

另一个选择是包括新的spring-cloud-starter-bootstrap。 已为Config Server,Consul,Zookeeper和Vault添加了对新的Spring Boot spring.config.import语法的支持。 仍支持配置不同服务的现有属性,但需要将它们放在application.properties或application.yml中。

  • spring.config.import=configserver:
  • spring.config.import=consul:
  • spring.config.import=zookeeper:
  • spring.config.import=vault:

之前若要禁用Spring Cloud Config Client端的健康指示用的是health.config.enabled=false,现改为management.health.config.enabled=false。保持了和Spring Boot控制端点风格一致 带有无效字符(破折号)的端点id已经改为符合标准的了,自此启动时再也没有讨厌的警告了,拯救洁癖者。

  • bus-env -> busenv
  • bus-refresh -> busrefresh
  • service-registry -> serviceregistry

此次2020年版本的spring cloud 最大的变化是移除了netflix组件,只保留了eureka组件。很多网友吐槽,刚学会spring cloud netflix还没有上生产,现在又要升级了。技术迭代确实比较快,但技术都是相通的,需要花点时间梳理下。本次我将为大家带来一个全新的Springcloud 2020版本的教程。先上一下教程的总体架构图。

sc2020jgt.png

https://blog.csdn.net/f641385712/article/details/111595426

https://github.com/alibaba/spring-cloud-alibaba/releases/tag/2020.0.RC1

https://spring.io/blog/2021/03/18/spring-cloud-2020-0-2-aka-ilford-is-available https://spring-cloud-alibaba-group.github.io/github-pages/hoxton/zh-cn/index.html

https://spring.io/blog/2020/12/22/spring-cloud-2020-0-0-aka-ilford-is-available


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK