距离Spring Boot 2.2.0的发布已经有一个半月左右时间,由于与之匹配的Spring Cloud版本一直没有Release,所以在这期间碰到不少读者咨询的问题都是由于Spring Boot和Spring Cloud版本不匹配导致。

很多时候,我们在学习或重建系统的时候都喜欢直接选用最高版本来开发,但是在使用Spring全家桶的时候,这样的选择不一定是最佳选择。主要还是由于Spring全家桶中各项目之间还存在一定的依赖关系。尤其是在大版本迭代期间,是我们尤其要注意的。比如,这次Spring Framework、Spring Boot、Spring Cloud的升级,是一次整体的大版本的升级,涵盖了Spring Framework 5.2、Spring Boot 2.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 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

在这次的版本升级中,我觉得以下几点是非常值得读者关注和学习的:

新的负载均衡器实现

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

通过引入org.springframework.cloud:spring-cloud-loadbalancer依赖,你就可以将新的BlockingLoadBalancerClientRestTemplate一起使用了。

同时,该依赖的引入也将支持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

相关阅读

Spring Cloud Hoxton正式发布,Spring Boot 2.2 不再孤单的更多相关文章

  1. spring cloud:搭建基于consul的服务提供者集群(spring cloud hoxton sr8 / spring boot 2.3.4)

    一,搭建基于consul的服务提供者集群 1,consul集群,共3个实例: 2, 服务提供者集群:共2个实例: 3,服务消费者:一个实例即可 4,consul集群的搭建,请参考: https://w ...

  2. spring cloud:通过client访问consul集群(spring cloud hoxton sr8 / spring boot 2.3.4)

    一,为什么要搭建consul的client? 1,网上的很多资料,访问consul时用的单机模式,这样是不可以直接在生产环境中使用的 还有一些资料,搭建了consul的集群后,直接访问集群中的某一个i ...

  3. Spring Cloud Finchley 正式发布,包含 4 个重大更新!

    在 Spring 的官方博客上已经看到 Spring Cloud Finchley 在 06 月 19 日这一天正式发布了,我们在 Maven 中央仓库也看到了最新版的更新. Finchley 正式版 ...

  4. 【spring cloud hoxton】Ribbon 真的能被 spring-cloud-loadbalancer 替代吗

    背景 早上刷圈看到 Spring Cloud Hoxton.M2 Released 的消息,随手发布到了我的知识星球,过了会有个朋友过来如下问题. 抽取半天时间学习spring-cloud-loadb ...

  5. Spring Cloud学习笔记--Spring Boot初次搭建

    1. Spring Boot简介 初次接触Spring的时候,我感觉这是一个很难接触的框架,因为其庞杂的配置文件,我最不喜欢的就是xml文件,这种文件的可读性很不好.所以很久以来我的Spring学习都 ...

  6. Spring Cloud Bus介绍--Spring Cloud学习第七天(非原创)

    一.什么是Spring Cloud Bus二.Spring Cloud Bus之RabbitMQ介绍三.Spring Cloud Bus整合RabbitMQ四.Spring Cloud Bus整合Ka ...

  7. 【Spring Cloud】Spring Cloud之整合Spring Cloud Bus以及最佳实践

    一.整合步骤 1)加入Maven坐标 <!-- actuator监控模块 --> <dependency> <groupId>org.springframework ...

  8. Spring Cloud 学习 之 Spring Cloud Eureka(源码分析)

    Spring Cloud 学习 之 Spring Cloud Eureka(源码分析) Spring Boot版本:2.1.4.RELEASE Spring Cloud版本:Greenwich.SR1 ...

  9. spring Cloud网关之Spring Cloud Gateway

    Spring Cloud Gateway是什么?(官网地址:https://cloud.spring.io/spring-cloud-gateway/reference/html/) Spring C ...

随机推荐

  1. C++中对C的扩展学习新增语法——强制类型转换

    类型转换:主要进行指针类型转换,因为在C++中,不同类型指针不允许隐式转换,任何一个程序中如果出现了大量的类型转换,说明该程序不是太好的程序. 注意事项: 不同类型指针不允许隐式转换: void* 类 ...

  2. Fuzzy模糊推导(Matlab实现)

    问题呈述 在模糊控制这门课程中,学到了与模糊数学及模糊推理相关的内容,但是并不太清楚我们在选择模糊规则时应该如何处理,是所有的规则都需要由人手工选择,还是仅需要选择其中的一部分就可以了.因此,在课程示 ...

  3. Web前端JS实现轮播图原理

    实现轮播图有很多方式,但是html的结构都是一样的.本文使用了Jquery框架,Dom操作更加方便灵活 html部分: <div class="banner"> < ...

  4. [java] 笔记 from黑马

    1. 关于String的创建.   PS:String的底层是用字节数组来实现的. 2.字符串常量池的笔记 具体指向是如下图的, 注意看0x666和0x999这两个地址. 3.原因如下: 4. 5. ...

  5. vue根据不同环境进行编译打包

    工作中我们在开发过程中,有很多的开发环境,如果我们不进行统一配置,那么我们只能手动进行更改,这样会给我们带来诸多不便,所以我们要配置根据不同的环境来进行编译打包. 先看一下我的项目目录: 在confi ...

  6. Python项目开发公用方法--excel生成方法

    在实际开发中,我们有时会遇到数据导出的需求.一般的,导出的文件格式为Excel形式. 那么,excel的生成就适合抽离出一个独立的公用方法来实现: def generate_excel(excel_n ...

  7. 心里有点B树

    在说B树之前最好先看看2-3树, 2-3树是B树的一种特例, 什么B树, B树就是2-3树, 2-3-4 树 , 2-3-4-5... 树的统称, 而B+树又是B树的一种变形 性质: 什么是二节点, ...

  8. hdu 1171 Big Event in HDU (01背包, 母函数)

    Big Event in HDU Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others ...

  9. MemoryStream相关知识分享

    一.简单介绍一下MemoryStream MemoryStream是内存流,为系统内存提供读写操作,由于MemoryStream是通过无符号字节数组组成的,可以说MemoryStream的性能可以算比 ...

  10. 遗忘root密码,应该如何修改?[CentOS7.5]

    https://www.lanzous.com/i71hw6d 下载视频演示 实验环境:VMware Workstation [CentOS7.5]遗忘root用户密码 应该如何修改??? 设置BIO ...