Spring Cloud 2025.1.0(又名 Oakwood)已釋出

釋出 | Spencer Gibb | 2025年11月25日 | ...

我很高興代表社群宣佈 Spring Cloud 2025.1.0 釋出列車的通用可用性(RELEASE)已於今日釋出。該版本可在 Maven Central 中找到。您可以檢視 2025.1.0 發行說明以獲取更多資訊

2025.1.0 釋出列車中的顯著變化

這是一個主要版本,每個專案都已更新到 5.0.0 版本。此版本基於 Spring Framework 7 和 Spring Boot 4。

此版本的所有更改列表可在 2025.1.0 GitHub 專案中找到。

Spring Cloud 釋出

  • spring-cloud-stater-parent 工件已被移除 (#437)

Spring Cloud Gateway

  • Spring Cloud Gateway 現在所有公共 API 類都使用 JSpecify 進行了 null 安全性註解 (#3953)
  • 基於 Spring Framework 重試功能的重試過濾器 (#3970)
  • JSpecify 的初步支援 (#3944)
  • 在 gRPC 中使用 Google 庫進行 JSON 處理 (#3853)
  • 移除棄用的 artifact,轉而使用新的 artifact。新的 artifact 是 spring-cloud-gateway-server-web{flux|mvc}spring-cloud-gateway-proxyexchange-web{flux|mvc} #3858
  • Server WebFlux 中的新 API 版本控制謂詞 #3864

Spring Cloud Commons

  • Spring Cloud Commons 現在所有公共 API 類都使用 JSpecify 進行了 null 安全性註解 (#1594)
  • 新增 LoadBalancer API 版本控制支援 #1582
  • Spring Interface Clients AutoConfiguration 的負載均衡器整合 #1491, #1492
  • Spring Interface Clients AutoConfiguration 的 CircuitBreaker 整合 #1538

Spring Cloud Circuitbreaker

  • 已新增一個新模組,其中包含使用 Spring Framework 7.0.0 中新的彈性支援 的 Spring Cloud Circuitbreaker 實現。(#256)
  • 模組 spring-cloud-circuitbreaker-spring-retry 已進入僅維護模式,並將在 Spring Retry 不再受支援時移除。
  • 將 Resilience4j 升級到 2.3.0
  • Spring Cloud Circuit Breaker 的版本已升級到 5.0.x,以與釋出列車的其餘部分保持一致,跳過了 4.0.x 版本。

Spring Cloud Config

  • 過渡到使用 Jackson 3 (#3131)
  • 移除了所有棄用的類和方法 (#2908)

Spring Cloud Stream

  • 支援 KTable 例項化快取和日誌控制選項
  • 支援 Rabbit 繫結器屬性中的消費者優先順序支援
  • 遷移到 Jackson 3
  • artifact org.springframework.cloud:spring-cloud-stream-binder-kafka-reactive 已被移除,因為 Reactor Kafka 已停止開發。請參閱 此部落格文章 以獲取更多資訊。

Spring Cloud Netflix

  • 移除 RestTemplate 支援 (#4504)

Spring Cloud Consul

  • ewcid-api 替換為非阻塞介面客戶端 (#475)
  • 用介面客戶端替換第三方 Consul HTTP 客戶端 #840

Spring Cloud Function

  • 複雜輸入/輸出型別發現的顯著增強。
  • 支援 Kotlin 函式的後處理。儘管此功能主要用於 Spring Cloud Stream,但支援的實現位於 Spring Cloud Functions 中。
  • 支援在 AWS Lambda 的 AWS Custom Runtime 支援中保留 AWS Context
  • 遷移到 Jackson 3
  • 停止 spring-cloud-function-rscoket
  • 停止 spring-cloud-function-deployer

Spring Cloud Contract

Spring Cloud Kubernetes

  • 現在可以透過設定 management.info.leader.enabled=false 來停用 Leader election info contributor (#2085)
  • 已移除廢棄的類和方法,並對公共類進行了多項改進。請參閱里程碑以獲取完整的更改列表
  • Kubernetes Java Client 升級到 24.0.0
  • Fabric8 Kubernetes Client 升級到 7.4.0
  • Spring Cloud Kuberentes 的版本已升級到 5.0.x,以與釋出列車的其餘部分保持一致,跳過了 4.0.x 版本。

Spring Cloud Openfeign

  • 移除棄用項。 (#1268)

以下模組作為 2025.1.0 的一部分進行了更新

模組 版本 問題
Spring Cloud Stream 5.0.0 (問題)
Spring Cloud Netflix 5.0.0 (問題)
Spring Cloud Starter Build 2025.1.0 (問題)
Spring Cloud Commons 5.0.0 (問題)
Spring Cloud Circuitbreaker 5.0.0 (問題)
Spring Cloud Gateway 5.0.0 (問題)
Spring Cloud Config 5.0.0 (問題)
Spring Cloud Build 5.0.0 (問題)
Spring Cloud Consul 5.0.0 (問題)
Spring Cloud Function 5.0.0 (問題)
Spring Cloud Contract 5.0.0 (問題)
Spring Cloud Vault 5.0.0 (問題)
Spring Cloud Task 5.0.0 (問題)
Spring Cloud Kubernetes 5.0.0 (問題)
Spring Cloud Openfeign 5.0.0 (問題)
Spring Cloud Zookeeper 5.0.0 (問題)
Spring Cloud Bus 5.0.0 (問題)

一如既往,我們歡迎大家在 GitHubGitterStack OverflowTwitter 上提供反饋。

Maven 起步使用 BOM(僅依賴管理)

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>2025.1.0</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
<dependencies>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-config</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
    </dependency>
    ...
</dependencies>

或使用 Gradle

plugins {
  id 'java'
  id 'org.springframework.boot' version '4.0.0'
  id 'io.spring.dependency-management' version '1.1.7'
}

group = 'com.example'
version = '0.0.1-SNAPSHOT'
description = 'Demo project for Spring Boot'

repositories {
  mavenCentral()
}

ext {
  set('springCloudVersion', "2025.1.0")
}

dependencies {
  implementation 'org.springframework.cloud:spring-cloud-starter-config'
  implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
  //...
}

dependencyManagement {
  imports {
    mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
  }
}

獲取 Spring 新聞通訊

透過 Spring 新聞通訊保持聯絡

訂閱

領先一步

VMware 提供培訓和認證,助您加速進步。

瞭解更多

獲得支援

Tanzu Spring 提供 OpenJDK™、Spring 和 Apache Tomcat® 的支援和二進位制檔案,只需一份簡單的訂閱。

瞭解更多

即將舉行的活動

檢視 Spring 社群所有即將舉行的活動。

檢視所有