Spring Cloud Greenwich.RELEASE 现已可用

版本发布 | Ryan Baxter | 2019 年 1 月 23 日 | ...

我很高兴代表社区宣布 Spring Cloud Greenwich Release Train 的通用可用性 (RELEASE) 版本今日发布。您可以在 Maven Central 中找到此版本。您可以查看 Greenwich 版本说明以获取更多信息

生命周期结束 (EOL) 提醒

Edgware release train 将于 2019 年 8 月 1 日达到 EOL(生命周期结束)状态。您可以在 这里 阅读正式公告。

Spring Cloud Finchley 发布版本周期被视为一个主要版本,并且与 Spring Boot 2.0.x 版本相关联。因此,当 Spring Boot 2.0.x 版本分支被标记为 EOL(生命周期结束)时,Spring Cloud Finchley 发布版本周期也将达到 EOL 状态。一旦确定日期,我们将在本博客上发布相关公告。

Spring Cloud Greenwich 发布版本周期被视为一个次要版本,并将继续支持 Spring Boot 2.x 版本分支。

Greenwich Release Train 的主要变更

所有项目都进行了更新以兼容 Java 11。

新项目

Greenwich 发布版本周期包含两个新项目:Spring Cloud GCP(提供与 Google Cloud Platform 的集成)和 Spring Cloud Kubernetes(提供与 Kubernetes 的集成)。

Spring Cloud Netflix 项目进入维护模式

最近,Netflix 宣布 Hystrix 进入维护模式。Ribbon 自 2016 年以来一直处于 类似状态。尽管 Hystrix 和 Ribbon 现在处于维护模式,但它们仍在 Netflix 大规模部署。

Hystrix Dashboard 和 Turbine 已被 Atlas 取代。这些项目最后一次提交是在两年前和四年前。Zuul 1 和 Archaius 1 都已被不向后兼容的后续版本取代。

以下 Spring Cloud Netflix 模块和相应的启动器将进入维护模式:

  1. spring-cloud-netflix-archaius
  2. spring-cloud-netflix-hystrix-contract
  3. spring-cloud-netflix-hystrix-dashboard
  4. spring-cloud-netflix-hystrix-stream
  5. spring-cloud-netflix-hystrix
  6. spring-cloud-netflix-ribbon
  7. spring-cloud-netflix-turbine-stream
  8. spring-cloud-netflix-turbine
  9. spring-cloud-netflix-zuul

这不包括 Eureka 或 concurrency-limits 模块。

什么是维护模式?

将一个模块置于维护模式意味着 Spring Cloud 团队将不再为该模块添加新功能。我们将修复阻塞性 bug 和安全问题,并且还会考虑和审查社区提交的小型拉取请求。

我们打算在 Greenwich 发布版本周期 正式发布后,**至少**支持这些模块一年。

替代方案

我们建议使用以下方案来替代这些模块提供的功能。

当前 替代方案
Hystrix Resilience4j
Hystrix Dashboard / Turbine Micrometer + Monitoring System
Ribbon Spring Cloud Loadbalancer
Zuul 1 Spring Cloud Gateway
Archaius 1 Spring Boot 外部配置 + Spring Cloud Config

请关注后续关于 Spring Cloud Loadbalancer 以及与新的 Netflix 项目 Concurrency Limits 集成的博客文章。

Spring Cloud Sleuth

  • 更新至最新的 Brave 库。
  • WebFlux 和 Reactor 集成的性能改进。
  • 已添加 GRPC 仪表盘。
  • 已添加对多个 Span Reporter 的支持。
  • 已添加速率限制采样器支持。

Spring Cloud GCP

请参阅 Google 的 发布公告

Spring Cloud Netflix

  • 升级了 Ribbon 和 Eureka 版本。
  • 增加了对新的 ServiceInstance.instanceId 字段的支持。

Spring Cloud Consul

  • 增加了对新的 ServiceInstance.instanceId 字段的支持。

Spring Cloud Gateway

  • 添加了重写响应头过滤器。
  • 为路由谓词中支持的多个路径和主机增加了支持,并允许在特定情况下自定义返回的 HTTP 状态码。

Spring Cloud Function

  • Kotlin 支持
  • Azure Functions 的新编程模型
  • 在 Web Adapter 中自动(可选)导出 Supplier 在启动时。
  • 函数式 Bean 注册
  • . . . 以及更多

Spring Cloud Stream

请参阅 Spring Cloud Stream 的 发布公告

Spring Cloud Zookeeper

  • 增加了对新的 ServiceInstance.instanceId 字段的支持。

Spring Cloud Task

请参阅 Spring Cloud Task 的 发布公告

Spring Cloud Kubernetes

  • 现在可以配置 ServiceInstance 元数据,使其来自 Kubernetes Labels、Annotations 和 Ports。
  • 在引导时增强了 KubernetesDiscoveryClient 的使用。
  • 添加了一个检测 Istio 是否存在的模块。

Spring Cloud Contract

  • 添加了对 XML 载荷的支持 issue
  • 允许将契约转储为通用表示 issue
  • 为使用 WebFlux 测试契约添加了 WebTestClient 支持 issue
  • 改进了 Pact 集成 issue
  • 重新添加了 Camel 支持 issue
  • 添加了 JUnit5 支持 issue
  • 将 WireMock 升级到最新版本 issue
  • 添加了对二进制载荷的支持 issue
  • 添加了对 Git 存储中最新版本 issue 的支持。
  • 允许为正则表达式生成提供显式类型 issue

Spring Cloud Security

  • Spring Cloud Gateway 过滤器添加了对 OAuth2 的支持。演示其用法的示例应用程序可在此处 找到

Spring Cloud Config

  • 添加了 EnvironmentRepository 以支持 CredHub 后端。

Spring Cloud Vault

  • 添加了对 Google Cloud 和 Azure 身份验证的支持。
  • 升级到 Spring Vault 2.1.1。

Spring Cloud OpenFeign

  • 增加了对 @QueryMap 注解的支持。
  • 升级到 OpenFeign 10.1.0。

Spring Cloud Commons

  • ServiceInstance 接口中添加了 instanceId
  • 添加了一个 ReactiveLoadBalancer 接口,并使用 Reactor 实现。

以下模块已作为 Greenwich.RELEASE 的一部分进行了更新:

| Module | Version | Issues |--- |--- |--- |--- | Spring Cloud Sleuth | 2.1.0.RELEASE | (issues) | Spring Cloud Gcp | 1.1.0.RELEASE | (issues) | Spring Cloud Build | 2.1.2.RELEASE |   | Spring Cloud Netflix | 2.1.0.RELEASE | (issues) | Spring Cloud Consul | 2.1.0.RELEASE |   | Spring Cloud Gateway | 2.1.0.RELEASE | (issues) | Spring Cloud | Greenwich.RELEASE |   | Spring Cloud Function | 2.0.0.RELEASE | (issues) | Spring Cloud Stream | Fishtown.RELEASE |   | Spring Cloud Zookeeper | 2.1.0.RELEASE |   | Spring Cloud Cloudfoundry | 2.1.0.RELEASE |   | Spring Cloud Aws | 2.1.0.RELEASE |   | Spring Cloud Task | 2.1.0.RELEASE |   | Spring Cloud Kubernetes | 1.0.0.RELEASE | (issues) | Spring Cloud Contract | 2.1.0.RELEASE | (issues) | Spring Cloud Release | Greenwich.RELEASE |   | Spring Cloud Security | 2.1.0.RELEASE |   | Spring Cloud Starter | Greenwich.RELEASE |   | Spring Cloud Bus | 2.1.0.RELEASE | (issues) | Spring Cloud Config | 2.1.0.RELEASE | (issues) | Spring Cloud Vault | 2.1.0.RELEASE | (issues) | Spring Cloud Openfeign | 2.1.0.RELEASE | (issues) | Spring Cloud Commons | 2.1.0.RELEASE |   | Spring Cloud Dependencies | 2.1.2.RELEASE |  

一如既往,我们欢迎在 GitHubGitterStack OverflowTwitter 上提供反馈。

Maven 起步使用 BOM(仅依赖管理)


<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>Greenwich.RELEASE</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.RELEASE'
    }
}

dependencies {
    compile 'org.springframework.cloud:spring-cloud-starter-config'
    compile 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
    ...
}

获取 Spring 新闻通讯

通过 Spring 新闻通讯保持联系

订阅

领先一步

VMware 提供培训和认证,助您加速进步。

了解更多

获得支持

Tanzu Spring 提供 OpenJDK™、Spring 和 Apache Tomcat® 的支持和二进制文件,只需一份简单的订阅。

了解更多

即将举行的活动

查看 Spring 社区所有即将举行的活动。

查看所有