领先一步
VMware 提供培训和认证,助您加速进步。
了解更多我谨代表社区,很高兴地宣布,Spring Cloud Greenwich Release Train 的 Service Release 3 (SR3) 今天正式发布。您可以在 Maven Central 中找到该版本。您可以查看 Greenwich 的 发布说明以获取更多信息。在 GitHub 上的 Spring Cloud Greenwich.SR3 项目 中可以找到此版本中已关闭的所有项目的问题。
Spring Cloud Greenwich.M3 是第一个包含阻塞式和非阻塞式负载均衡器客户端实现的版本,作为 Netflix Ribbon 的替代方案,Netflix Ribbon 已进入维护模式。
要将新的 BlockingLoadBalancerClient 与 RestTemplate 一起使用,您需要在应用程序的类路径中包含 org.springframework.cloud:spring-cloud-loadbalancer。当使用 @LoadBalanced WebClient.Builder 的反应式应用程序中可以使用相同的依赖项 — 唯一的区别是 Spring Cloud 将自动配置一个 ReactorLoadBalancerExchangeFilterFunction 实例。有关更多信息,请参阅文档。新的 ReactorLoadBalancerExchangeFilterFunction 也可以自动装配并直接传递给 WebClient.Builder(请参阅文档)。对于所有这些功能,底层使用的是基于 Project Reactor 的 RoundRobinLoadBalancer。
DiscoveryClient 实现现在可以从所有命名空间检索服务/actuator/gateway/routesJerseyReplicationClient 添加额外过滤器的能力以下模块已在 Greenwich.SR3 中更新
| 模块 | 版本 | 问题 |--- |--- |--- |--- | Spring Cloud Commons | 2.1.3.RELEASE | (问题) | Spring Cloud Openfeign | 2.1.3.RELEASE | (问题) | Spring Cloud Security | 2.1.4.RELEASE | (问题) | Spring Cloud Stream | Fishtown.SR4 |
| Spring Cloud Kubernetes | 1.0.3.RELEASE | (问题) | Spring Cloud Build | 2.1.7.RELEASE |
| Spring Cloud Zookeeper | 2.1.3.RELEASE |
| Spring Cloud Gateway | 2.1.3.RELEASE | (问题) | Spring Cloud Dependencies | Greenwich.SR3 |
| Spring Cloud Netflix | 2.1.3.RELEASE | (问题) | Spring Cloud Bus | 2.1.3.RELEASE | (问题) | Spring Cloud Dependencies Parent | 2.1.7.RELEASE |
| Spring Cloud Task | 2.1.3.RELEASE |
| Spring Cloud Starter | Greenwich.SR3 |
| Spring Cloud Cloudfoundry | 2.1.3.RELEASE |
| Spring Cloud | Greenwich.SR3 |
| Spring Cloud Vault | 2.1.3.RELEASE |
| Spring Cloud Config | 2.1.4.RELEASE | (问题) | Spring Cloud Release | Greenwich.SR3 |
| Spring Cloud Function | 2.0.2.RELEASE | (问题) | Spring Cloud Consul | 2.1.3.RELEASE | (问题) | Spring Cloud Starter Parent | Greenwich.SR3 |
| Spring Cloud Gcp | 1.1.3.RELEASE |
| Spring Cloud Sleuth | 2.1.3.RELEASE |
| Spring Cloud Aws | 2.1.3.RELEASE |
| Spring Cloud Contract | 2.1.3.RELEASE | (问题)
一如既往,我们欢迎大家在 GitHub、Gitter、Stack Overflow 或 Twitter 上提供反馈。
Maven 起步使用 BOM(仅依赖管理)
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Greenwich.SR3</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
buildscript {
dependencies {
classpath "io.spring.gradle:dependency-management-plugin:1.0.2.RELEASE"
}
}
apply plugin: "io.spring.dependency-management"
dependencyManagement {
imports {
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Greenwich.SR3'
}
}
dependencies {
compile 'org.springframework.cloud:spring-cloud-starter-config'
compile 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
...
}