领先一步
VMware 提供培训和认证,助您加速进步。
了解更多我谨代表社区,很高兴地宣布 Spring Cloud Finchley 发行版系列的 Milestone 6 (M6) 今天已发布。可以在 Spring Milestone 仓库中找到该版本。您可以查看 Finchley 发布说明以获取更多信息。
Finchley.M6 与 Spring Boot RC1 兼容。为了与 RC1 兼容,已进行了许多更新。
Spring Cloud Sleuth 的内部已重写为使用 Brave。有关更多信息,请参阅迁移指南。
网关的性能得到了显著提升。Hystrix 过滤器已添加回退支持。Java Route DSL 也有更新。要添加过滤器,请使用新的 filters() 方法,如下所示:
@Bean
public RouteLocator customRouteLocator(RouteLocatorBuilder builder, ThrottleGatewayFilterFactory throttle) {
return builder.routes()
.route(r -> r.host("**.abc.org").and().path("/image/png")
.filters(f ->
f.addResponseHeader("X-TestHeader", "foobar"))
.uri("http://httpbin.org:80")
)
.build();
}
现在 Webflux 应用程序可以使用 /hystrix.stream 端点。
Cloud Foundry Spring Cloud 已更新,以使用最新的 Cloud Foundry Java 客户端。
现在可以使用 YAML 定义契约。我们还开始发布 Docker 镜像,以支持多语言。稍后将发布一篇博客文章介绍这一点。
对 CloudWatch 指标的 Micrometer 支持。
已添加响应式会话支持。
作为 Finchley.M6 的一部分,已更新以下模块:
| 模块 | 版本 |
|---|---|
| Spring Cloud Zookeeper | 2.0.0.M5 |
| Spring Cloud Sleuth | 2.0.0.M6 |
| Spring Cloud Consul | 2.0.0.M5 |
| Spring Cloud Gateway | 2.0.0.M6 |
| Spring Cloud Netflix | 2.0.0.M6 |
| Spring Cloud Cloudfoundry | 2.0.0.M3 |
| Spring Cloud Contract | 2.0.0.M6 |
| Spring Cloud Security | 2.0.0.M1 |
| Spring Cloud Stream | Elmhurst.M4 |
| Spring Cloud Bus | 2.0.0.M5 |
| Spring Cloud Config | 2.0.0.M6 |
| Spring Cloud Aws | 2.0.0.M3 |
| Spring Cloud Commons | 2.0.0.M6 |
| Spring Cloud Vault | 2.0.0.M5 |
一如既往,我们欢迎在 GitHub、Gitter、Stack Overflow 和 Twitter 上提供反馈。
要使用 Maven 和 BOM(仅限依赖管理)开始,请包含以下内容:
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Finchley.M6</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"
}
}
repositories {
maven {
url 'http://repo.spring.io/milestone'
}
}
apply plugin: "io.spring.dependency-management"
dependencyManagement {
imports {
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Finchley.M6'
}
}
dependencies {
compile 'org.springframework.cloud:spring-cloud-starter-config'
compile 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
...
}