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
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
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 REST Docs 中放弃了对 REST Assured 的支持,因此已移除对它的支持。
- stubrunner. -> spring.cloud.contract.stubrunner. 属性迁移 (#2309)
- 移除了
javax.inject和javax.annotation支持 #2206
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 | (问题) |
一如既往,我们欢迎大家在 GitHub、Gitter、Stack Overflow 或 Twitter 上提供反馈。
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}"
}
}
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/319003.html