一、发布说明
Spring Cloud 2021.0 Release Train 的 Service Release 2 现已推出。这主要是一个错误修复版本。该版本可以在Maven Central中找到。您可以查看 2021.0.2发行说明以获取更多信息。
二、更新内容
2.1 Spring Cloud Commons
2.2 Spring Cloud Sleuth
修复文档中指向 Sleuth 样本的链接 ( 2148 )
重新定位 SleuthSpanContextSupplier ( 2147 )
Reactor Netty ( 2132 )的文档访问日志
修复 Zipkin WebClientSender 的 Content-Type ( 2139 , 2126 )
修复 RSocket 的 Netty LEAK 报告 ( 2102 )
停止包装 AbstractPlatformTransactionManager 实现 ( 2114 )
在创建 SkipPatternProvider ( 2136 )时发生 BeanCreationException 时添加日志消息
Prometheus 示例的自动配置 ( 2143 )
修复 Rabbit、Kafka 和 Zipkin 的自动配置顺序 ( 2134 )
修复使用 WebClient 的线程无效阻塞 ( 2127 )
修复无效的 ThreadLocalSpan 堆栈和跟踪上下文泄漏 ( 2064 )
2.3 Spring Cloud Contract
2.4 Spring Cloud OpenFeign
2.5 Spring Cloud Netflix
2.6 Spring Cloud CircuitBreaker
2.7 Spring Cloud Kubernetes
2.8 2021.0.2版本相关依赖更新内容如下:
模块 | 版本 | Issues |
---|
Spring Cloud Config | 3.1.2 | (issues) |
Spring Cloud Circuitbreaker | 2.1.2 | (issues) |
Spring Cloud Kubernetes | 2.1.2 | (issues) |
Spring Cloud Commons | 3.1.2 | (issues) |
Spring Cloud Sleuth | 3.1.2 | (issues) |
Spring Cloud Contract | 3.1.2 | (issues) |
Spring Cloud Task | 2.4.2 | (issues) |
Spring Cloud Gateway | 3.1.2 | (issues) |
Spring Cloud OpenFeign | 3.1.2 | (issues) |
Spring Cloud Starter Build | 2021.0.2 |
|
Spring Cloud Netflix | 3.1.2 | (issues) |
Spring Cloud Function | 3.2.4 |
|
Spring Cloud Stream | 3.2.3 |
|
三、项目引入
3.1 maven方式引入
<dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>2021.0.2</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>
3.2 Gradle引入
plugins { id 'org.springframework.boot' version '2.6.7' id 'io.spring.dependency-management' version '1.0.11.RELEASE' id 'java' } repositories { mavenCentral() } ext { set('springCloudVersion', "2021.0.2") } 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 Cloud 2021.0.2的项目样例:https://gitee.com/matevip/matecloud