Spring Cloud 2023.0.0(代号 Leyton)发布

Spring Cloud 2023.0.0(代号 Leyton)RELEASE 版本已发布。你可以在 Maven Central 中找到该版本。 欲了解更多细节,可以查阅 2023.0 发布说明。

2023.0 版本中的显著变化

此版本基于 Spring Boot 3.2.0。

点击 此处 查看 2023.0.0 中的所有 issues。

Spring Cloud Gateway

  • 2023.0 中包含与 Servlet/Spring MVC 兼容的 Spring Gateway Server MVC(issue,初始 PR)
  • Gateway Actuator 发现功能增强 (PR 3147)

Spring Cloud Function

Spring Cloud Openfeign

  • 支持 Java HttpClient(#689)

Spring Cloud Commons

  • 重新启动时的刷新范围(Refresh Scope) - 为适应 JVM 检查点重启时的环境变化而量身定制的功能(PR 1266)
  • 为新的 RestClient 提供负载均衡支持 (1293)
  • 确定性子集负载均衡算法,用于限制实例数量(1288)。

Spring Cloud Config

  • Config Server 支持 Native image(PR 2361)

Spring Cloud Kubernetes

  • 将 fabric8 升级至 6.7.2 (#1373)
  • 将 Kubernetes Java 客户端升级到 19.0.0 (1502)

Spring Cloud Build

  • 所有 Spring Cloud 文档都是在 Antora 的支持下构建的,其中包括新的搜索功能。

模块更新

以下模块已作为 2023.0.0 的一部分进行了更新:

模块 版本 Issues
Spring Cloud Function 4.1.0 (issues)
Spring Cloud Vault 4.1.0 (issues)
Spring Cloud Zookeeper 4.1.0 (issues)
Spring Cloud Circuitbreaker 3.1.0 (issues)
Spring Cloud Task 3.1.0 (issues)
Spring Cloud Kubernetes 3.1.0 (issues)
Spring Cloud Starter Build 2023.0.0 (issues)
Spring Cloud Openfeign 4.1.0 (issues)
Spring Cloud Bus 4.1.0 (issues)
Spring Cloud Stream 4.1.0 (issues)
Spring Cloud Commons 4.1.0 (issues)
Spring Cloud Contract 4.1.0 (issues)
Spring Cloud Netflix 4.1.0 (issues)
Spring Cloud Consul 4.1.0 (issues)
Spring Cloud Config 4.1.0 (issues)
Spring Cloud Build 4.1.0 (issues)
Spring Cloud Gateway 4.1.0 (issues)

一如既往,欢迎在 GitHub、Gitter、Stack Overflow 或 Twitter 上提出反馈意见。

开始使用

使用 Maven 的 BOM(仅限依赖关系管理):

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>2023.0.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 '3.2.0'
  id 'io.spring.dependency-management' version '1.1.4'
}

repositories {
  mavenCentral()
}

ext {
  set('springCloudVersion', "2023.0.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}"
  }
}

Ref:https://spring.io/blog/2023/12/06/spring-cloud-2023-0-0-aka-leyton-is-now-available