Spring Cloud Hoxton正式发布,Spring Boot 2.2 再也不孤单

距离Spring Boot 2.2.0的发布已经有一个半月左右时间,因为与之匹配的Spring Cloud版本一直没有Release,因此在这期间碰到很多读者咨询的问题都是因为Spring Boot和Spring Cloud版本不匹配致使。spring

不少时候,咱们在学习或重建系统的时候都喜欢直接选用最高版原本开发,可是在使用Spring全家桶的时候,这样的选择不必定是最佳选择。主要仍是因为Spring全家桶中各项目之间还存在必定的依赖关系。尤为是在大版本迭代期间,是咱们尤为要注意的。好比,此次Spring Framework、Spring Boot、Spring Cloud的升级,是一次总体的大版本的升级,涵盖了Spring Framework 5.二、Spring Boot 2.二、Spring Cloud Hoxton。负载均衡

因为Spring Boot 2.2基于Spring Framework 5.2构建,而Spring Cloud Hoxton又基于Spring Boot 2.2构建。因此,在Spring Cloud Hoxton发布Release版本以前,出现了不少Spring Boot 2.2搭配Spring Cloud Greenwich版本使用而出现各类莫名问题的状况。spring-boot

如今Spring Cloud Hoxton的正式发布,也预示着Spring Cloud用户能够正式开始往Spring Boot 2.2.x版本进行逐步升级。性能

Spring Cloud Hoxton版本内容

下面咱们来关注下在Spring Cloud Hoxton版本中都提高了哪些内容。先来看看此次各依赖项目的版本升级:学习

  • Spring Cloud Aws 2.2.0.RELEASE
  • Spring Cloud Vault 2.2.0.RELEASE
  • Spring Cloud Circuitbreaker 1.0.0.RELEASE
  • Spring Cloud Cli 2.2.0.RELEASE
  • Spring Cloud Gateway 2.2.0.RELEASE
  • Spring Cloud Zookeeper 2.2.0.RELEASE
  • Spring Cloud Starter Hoxton.RELEASE
  • Spring Cloud Build 2.2.0.RELEASE
  • Spring Cloud Config 2.2.0.RELEASE
  • Spring Cloud Dependencies Parent 2.2.0.RELEASE
  • Spring Cloud Starter Parent Hoxton.RELEASE
  • Spring Cloud Sleuth 2.2.0.RELEASE
  • Spring Cloud Contract 2.2.0.RELEASE
  • Spring Cloud Gcp 1.2.0.RELEASE
  • Spring Cloud Bus 2.2.0.RELEASE
  • Spring Cloud Consul 2.2.0.RELEASE
  • Spring Cloud Stream Horsham.RELEASE
  • Spring Cloud Kubernetes 1.1.0.RELEASE
  • Spring Cloud Openfeign 2.2.0.RELEASE
  • Spring Cloud Commons 2.2.0.RELEASE
  • Spring Cloud Dependencies Hoxton.RELEASE
  • Spring Cloud Task 2.2.0.RC1
  • Spring Cloud Function 3.0.0.RELEASE
  • Spring Cloud Hoxton.RELEASE
  • Spring Cloud Netflix 2.2.0.RELEASE
  • Spring Cloud Security 2.2.0.RELEASE
  • Spring Cloud Release Hoxton.RELEASE
  • Spring Cloud Cloudfoundry 2.2.0.RELEASE

在此次的版本升级中,我以为如下几点是很是值得读者关注和学习的:ui

新的负载均衡器实现spa

Spring Cloud Hoxton版本中第一次引入同时支持阻塞式与非阻塞式的负载均衡器来做为已经进入维护状态的Netflix Ribbon。code

经过引入org.springframework.cloud:spring-cloud-loadbalancer依赖,你就能够将新的BlockingLoadBalancerClientRestTemplate一块儿使用了。blog

同时,该依赖的引入也将支持Reactive应用,跟其余使用同样,只须要使用@LoadBalanced来修饰WebClient.Builder便可。教程

新的断路器实现

该项目中定义了断路器的抽象API,以及对各开源实现的整合封装,其中包括:

  • Resilience4j
  • Spring Retry
  • Hystrix (spring-cloud-netflix)
  • Sentinel (spring-cloud-alibaba)

加入更多Reactive支持

  • Spring Cloud Gateway中增长ReactiveLoadBalancer
  • 如下组件中增长ReactiveDiscoveryClient服务发现实现:
    • Spring Cloud Netflix
    • Spring Cloud Consul
    • Spring Cloud Zookeeper
    • Spring Cloud Openfeign
    • Spring Cloud Cloudfoundry
    • Spring Cloud Kubernetes

相关阅读

欢迎关注个人公众号:程序猿DD,得到独家整理的学习资源和平常干货推送。 若是您对个人专题内容感兴趣,也能够关注个人博客:didispace.com

相关文章
相关标签/搜索