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

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

从maven仓库可知,当前版本为2020.0.2,

版本关系

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 Systemsentinel 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版本的教程。先上一下教程的总体架构图。

参考资料

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

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值