Spring Cloud Greenwich.RELEASE 现已可用

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

我代表社区,很高兴宣布 Spring Cloud Greenwich 发布列车的正式发布 (RELEASE) 版本今天已可用。该版本可在 Maven Central 中找到。您可以查看 Greenwich 发布说明以获取更多信息

生命周期结束 (EOL) 提醒

Edgware 发布列车将于 2019 年 8 月 1 日达到 EOL 状态。您可以在此处阅读正式公告。

Spring Cloud Finchley 发布列车被视为一个主要版本,与 Spring Boot 2.0.x 版本绑定。因此,Spring Cloud Finchley 发布列车将在 Spring Boot 2.0.x 版本分支标记为 EOL 时达到 EOL 状态。一旦确定日期,将在此博客上发布公告。

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

Greenwich 发布列车的显著变化

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

新项目

Greenwich 发布列车包含两个新项目,Spring Cloud GCP(提供与 Google Cloud Platform 的集成)和 Spring Cloud Kubernetes(提供与 Kubernetes 的集成)。

Spring Cloud Netflix 项目进入维护模式

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

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

以下 Spring Cloud Netflix 模块和相应的 starter 将进入维护模式

  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 团队将不再向该模块添加新功能。我们将修复阻断性错误和安全问题,并考虑和审查来自社区的小型拉取请求。

我们打算在 Greenwich 发布列车正式可用之日起,继续支持这些模块至少一年。

替代方案

我们推荐以下方案来替代这些模块提供的功能。

当前 替代
Hystrix Resilience4j
Hystrix Dashboard / Turbine Micrometer + 监控系统
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 适配器在启动时自动(可选)导出 Supplier
  • 函数式 Bean 注册
  • ... 更多内容

Spring Cloud Stream

请参阅 Spring Cloud Stream 发布公告

Spring Cloud Zookeeper

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

Spring Cloud Task

请参阅 Spring Cloud Task 发布公告

Spring Cloud Kubernetes

  • 您现在可以将 ServiceInstance 元数据配置为来自 Kubernetes 标签、注解和端口。
  • 增强功能已改进以在使用 bootstrap 时使用 KubernetesDiscoveryClient
  • 添加了一个模块来检测 Istio 的存在。

Spring Cloud Contract

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

Spring Cloud Security

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 的一部分进行了更新

| 模块 | 版本 | 问题 |--- |--- |--- |--- | Spring Cloud Sleuth | 2.1.0.RELEASE | (问题) | Spring Cloud Gcp | 1.1.0.RELEASE | (问题) | Spring Cloud Build | 2.1.2.RELEASE |   | Spring Cloud Netflix | 2.1.0.RELEASE | (问题) | Spring Cloud Consul | 2.1.0.RELEASE |   | Spring Cloud Gateway | 2.1.0.RELEASE | (问题) | Spring Cloud | Greenwich.RELEASE |   | Spring Cloud Function | 2.0.0.RELEASE | (问题) | 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 | (问题) | Spring Cloud Contract | 2.1.0.RELEASE | (问题) | Spring Cloud Release | Greenwich.RELEASE |   | Spring Cloud Security | 2.1.0.RELEASE |   | Spring Cloud Starter | Greenwich.RELEASE |   | Spring Cloud Bus | 2.1.0.RELEASE | (问题) | Spring Cloud Config | 2.1.0.RELEASE | (问题) | Spring Cloud Vault | 2.1.0.RELEASE | (问题) | Spring Cloud Openfeign | 2.1.0.RELEASE | (问题) | Spring Cloud Commons | 2.1.0.RELEASE |   | Spring Cloud Dependencies | 2.1.2.RELEASE |  

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

使用带有 BOM(仅依赖管理)的 Maven 入门


<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 社区所有即将举行的活动。

查看全部