先人一步
VMware 提供培训和认证,助您加速进步。
了解更多我代表社区,很高兴地宣布 Spring Cloud Greenwich Release Train 的 Service Release 3 (SR3) 今天可用了。此版本可以在 Maven Central 找到。您可以查看 Greenwich 的发布说明以获取更多信息。此版本在所有项目中关闭的所有问题都可以在 GitHub 上的Spring Cloud Greenwich.SR3 项目中找到。
Spring Cloud Greenwich.M3 是第一个包含阻塞和非阻塞负载均衡客户端实现的版本,作为已进入维护模式的 Netflix Ribbon 的替代方案。
要将新的 BlockingLoadBalancerClient
与 RestTemplate
一起使用,您需要在应用程序的 classpath 中包含 org.springframework.cloud:spring-cloud-loadbalancer
依赖。在响应式应用程序中使用 @LoadBalanced WebClient.Builder
时也可以使用相同的依赖项 - 唯一的区别是 Spring Cloud 会自动配置一个 ReactorLoadBalancerExchangeFilterFunction
实例。请参阅文档以获取更多信息。新的 ReactorLoadBalancerExchangeFilterFunction
也可以通过自动注入直接传递给 WebClient.Builder
(请参阅文档)。对于所有这些特性,底层都使用了基于 Project Reactor 的 RoundRobinLoadBalancer
。
DiscoveryClient
实现现在可以从所有命名空间中检索服务/actuator/gateway/routes
中添加了更详细的路由信息JerseyReplicationClient
添加额外过滤器的能力以下模块作为 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 上提供反馈意见。
通过带有 BOM(仅依赖管理)的 Maven 开始
<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'
...
}