专栏名称: OSC开源社区
OSChina 开源中国 官方微信账号
目录
相关文章推荐
程序员小灰  ·  Manus,又一国产AI封神了,一码难求! ·  3 天前  
OSC开源社区  ·  go-zero突破三万星——star数量最高 ... ·  5 天前  
编程技术进阶  ·  超详细的 Manus 分析报告流出(速领,待会删) ·  3 天前  
编程技术进阶  ·  超详细的 Manus 分析报告流出(速领,待会删) ·  3 天前  
码农翻身  ·  字节的Trae不像一个IDE,它更像一个人 ·  3 天前  
51好读  ›  专栏  ›  OSC开源社区

Spring Cloud 2024正式GA,年度大版本更新

OSC开源社区  · 公众号  · 程序员  · 2024-12-08 20:20

正文

↓推荐关注↓

2024 年都接近尾声了, Spring Cloud 2024 正式版才刚刚发布 ,真是姗姗来迟啊。

Spring Cloud 2024 从里程碑版本到正式版本,一共发布了 4 次版本:

  • 2024.0.0
  • 2024.0.0-RC1
  • 2024.0.0-M2
  • 2024.0.0-M1

来看看最新的版本情况:

Spring Cloud 2024 ,代号: Moorgate ,关于版本的 命名、代号,发布时间 是不是很奇怪?

其实 Spring Cloud 最新的版本命名方式早已经变更了,以后就是 YEAR.x 这种命名方式了,不清楚的可以看下我之前写的两篇文章:

比如我举两个例子:

Spring Cloud 2024.0.0 中的 2024 是指 Spring Cloud 2024.x 版本线,2023.0.0 则是指 2023 这个版本线的第 1 个版本,而不是指某个年份发布的版本。

如果没有意外, Spring Cloud 2025.x 将会在 2025 年 12 月份正式发布 ,也一样会经历里程碑版本、候选版本,最后发布正式版本,这需要一个周期。

新特性解读

Spring Cloud 2024.0.0 是一个大版本,来看看更新了啥。

系统环境

Spring Cloud 2024.0.0 基于以下环境进行构建:

所以,这也是 Spring Cloud 2024.0.0 的最低依赖要求,其实JDK 和 Spring 版本是跟 Spring Boot 版本走的,升级请小心兼容性。

模块升级

Spring Cloud 2024.0.0 更新了以下核心模块:

模块 版本
Spring Cloud Vault 4.2.0
Spring Cloud Bus 4.2.0
Spring Cloud Task 3.2.0
Spring Cloud Zookeeper 4.2.0
Spring Cloud Kubernetes 3.2.0
Spring Cloud Function 4.2.0
Spring Cloud Commons 4.2.0
Spring Cloud Openfeign 4.2.0
Spring Cloud Circuitbreaker 3.2.0
Spring Cloud Starter Build 2024.0.0
Spring Cloud Stream 4.2.0
Spring Cloud Consul 4.2.0
Spring Cloud Gateway 4.2.0
Spring Cloud Contract 4.2.0
Spring Cloud Config 4.2.0
Spring Cloud Build 4.2.0
Spring Cloud Netflix 4.2.0

Spring Cloud CircuitBreaker

之前的版本有一个问题:

CircuitBreaker 实例只支持全局禁用 TimeLimiter,或者必须定义一个自定义的长时间超时配置,即使实例不需要考虑超时问题,或者已经有超时配置,也需要使用该自定义配置。

Spring Cloud 2024.0.0 支持对所有 CircuitBreaker 实例, 按组或实例级别 禁用 TimeLimiter,可控制的颗粒度更小了。

Spring Cloud Config

更新内容如下:

  • 修复一个 S3 协议的后端存储,对于多个应用程序名称的行为有所不同的问题。
  • 支持在环境存储库中使用多标签,服务器端会处理多标签,无需客户端介入。
  • 支持使用给定的字符集存储和接收资源。
  • 添加对 MongoDB 环境存储库支持。

Spring Cloud Gateway

更新内容如下:

  • 支持缓存网关过滤器(filters),以避免在每一个请求中进行排序。
  • 支持在 HttpClientProperties 中配置 SslBundles 参数。
  • 支持 Netty 的 HTTP Client 连接池的 leasing 策略配置。
  • 支持在 MVC 服务器中实现 ModifyResponseBody。
  • 使用了新的 Spring Boot HTTP 客户端自动配置框架,配置更简单方便了。
  • Webflux Java DSL 添加了一个嵌套布尔谓词的方法。
  • 支持向路由添加启用标志。
  • 在 Grafana 模板中添加了 QPS、延迟等指标。
  • 修复了与多个路由一起使用的同一个 redis rate limiter bucket。

Spring Cloud Kubernetes

更新内容如下:

  • 添加对配置观察器(watcher)的支持,以关闭应用程序并刷新应用程序。

Spring Cloud Netflix

更新内容如下:

  • 添加对 RestClient 的支持,并成为了 Netflix Eureka 的默认 HTTP 客户端。

Spring Cloud Commons

更新内容如下:

  • 添加对负载平衡 RestTemplateBuilder 的支持。
  • 支持无需 KeyStore 就可以创建一个 TrustStore。

Spring Cloud Bus

更新内容如下:

  • 添加了一个关闭事件、端点,以及监听器。

Spring Cloud OpenFeign

更新内容如下:

  • ignorecase 字段添加到 Spring 分页,以与 SortHandlerMethodArgumentResolverSupport::parseIgnoreCase 进行兼容。

Spring Cloud Stream

更新内容如下:

  • 确保 BindingServiceProperties.bindings 的线程安全性。
  • 支持在 Supplier 中使用 PostProcessing 的能力。
  • 更改 DefaultBinderFactory 类的 getBinder 方法中 synchronized 的使用,以实现虚拟线程兼容。

插播一条:如果你近期准备面试跳槽,点击 Java面试库 小程序刷题吧,共 3000+ 道,几乎覆盖了所有主流 Java 技术面试题。

Spring Cloud 最新维护版本

Spring Cloud 支持的版本情况,以及对应的 Spring Boot、子模块版本如下表所示。

模块 * 2025.0 (Northfields)* 2024.0 (Moorgate) 2023.0 (Leyton) 2022.0 (Kilburn)
spring-boot 3.5.x 3.4.x 3.3.x/3.2.x 3.1.x/3.0.x
spring-cloud-bus 4.3.x 4.2.x 4.1.x 4.0.x
spring-cloud-circuitbreaker 3.3.x 3.2.x 3.1.x 3.0.x
spring-cloud-commons 4.3.x 4.2.x 4.1.x 4.0.x
spring-cloud-config 4.3.x 4.2.x 4.2.x 4.1.x
spring-cloud-consul 4.3.x 4.2.x 4.1.x 4.0.x
spring-cloud-contract 4.3.x 4.2.x 4.1.x 4.0.x
spring-cloud-function 4.3.x 4.2.x 4.1.x 4.0.x
spring-cloud-gateway 4.3.x 4.2.x 4.1.x 4.0.x
spring-cloud-kubernetes 3.3.x 3.2.x 3.1.x 3.0.x
spring-cloud-netflix 4.3.x 4.2.x 4.1.x 4.0.x
spring-cloud-openfeign 4.3.x 4.2.x 4.1.x 4.0.x
spring-cloud-stream 4.3.x 4.2.x 4.1.x 4.0.x
spring-cloud-task 3.3.x 3.2.x 3.1.x 3.0.x
spring-cloud-vault 4.3.x 4.2.x 4.1.x 4.0.x
spring-cloud-zookeeper 4.3.x 4.2.x 4.1.x 4.0.x






请到「今天看啥」查看全文