原文: https://spring.io/blog/2019/01/23/spring-cloud-greenwich-release-is-now-available
作者: Ryan Baxter
編譯: 春之雨

Spring Cloud Greenwich.RELEASE 現已正式發佈,可以在 Spring Milestone 和 Maven Central 庫獲取到。也可以查看 Greenwich 發佈說明了解更多信息。

壽命終止(EOL)提醒

Edgware 版本將於 2019 年 8 月 1日進入 EOL 狀態。詳細說明參見 Spring Cloud Edgware 將在2019年8月1號 EOL。

Spring Cloud Finchley 發佈版本是目前的主要版本,與 Spring Boot 2.0.x 版本保持一致。因此,Spring Cloud Finchley 的版本發佈將隨着 Spring Boot 2.0.x 版本分鐘進入 EOL 而相應終止維護。當明確的時間確定之後,具體的宣佈聲明屆時將會以博客文章的形式發佈出來。

Spring Cloud Greenwich 發佈版本是一個小版本,將會持續提供支持一直到 Spring Boot 2.x 分支結束。

Greenwich 版本值得注意的更新

所有相關的項目也都已經兼容 Java 11。

新項目

Greenwich 包括了兩個新項目: Spring Cloud GCP 和 Spring Cloud Kubernetes. 前者爲 Google Cloud Platform(GCP)的服務提供了集成支持,後者提供了 Kubernetes 的集成。

Spring Cloud Netflix 項目進入維護模式

最近,Netflix 宣佈 Hystrix 正在進入維護模式。自 2016 年以來,Ribbon 也已處於類似狀態。雖然 Hystrix 和 Ribbon 現在處於維護模式,但它們仍然在 Netflix 上大規模部署。

Hystrix Dashboard 和 Turbine 已被 Atlas 取代。這些項目的最後提交分別是 2 年和 4 年前。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 或併發限制模塊。

什麼是維護模式?

將模塊置於維護模式意味着 Spring Cloud 團隊將不再向模塊添加新功能。我們將修復重大程序錯誤和安全問題,我們還將考慮並審查社區的小的拉取請求(PR)。

我們打算繼續支持這些模塊,從 Greenwich 正式發佈可用之後算起至少一年的時間。

替代項目

我們建議將以下內容替換爲這些模塊提供的功能。


Spring Cloud Greenwich.RELEASE 正式發佈!一個非常有看頭的版本



查看有關 Spring Cloud Loadbalancer 的後續博客文章,並與新的 Netflix 項目 Concurrency Limits 集成。

Spring Cloud Sleuth

  • 升級到最新的 Brave 庫
  • WebFlux 和 Reactor 集成的性能得到提升
  • 支持 gRPC 插樁檢測
  • 增加了對多個跨度報告的支持
  • 增加了限速採樣器支持

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 函數提供的新編程模型
  • 在 Web 適配器啓動時自動(可選)導出Supplier
  • 函數式 Bean 的註冊
  • 更多介紹

Spring Cloud Stream

  • 詳見 發佈說明


Spring Cloud Zookeeper

  • 增加新的字段 ServiceInstance.instanceId


Spring Cloud Task

  • 詳見 發佈說明


Spring Cloud Kubernetes

  • 現在可以將 ServiceInstance 元數據配置爲來自 Kubernetes Labels、Annotations 和 Ports
  • 在引導期間使用 KubernetesDiscoveryClient 進行了增強
  • 添加了一個模塊來檢測 Istio 的存在

Spring Cloud Contract

  • 新增支持 XML payloads
  • 允許將合同轉儲爲通用表示
  • 添加了 WebTestClient 支持,用於測試與 WebFlux 的合約
  • 改進了 Pact 集成
  • 添加了 Camel 支持
  • 添加了 JUnit5 支持
  • 升級 WireMock 到最新版本
  • 添加了二進制負載的支持
  • 添加了對 Git 存儲中最新版本的支持
  • 允許爲正則表達式生成提供顯式類型

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


Spring Cloud Greenwich.RELEASE 正式發佈!一個非常有看頭的版本



要使用BOM開始使用Maven(僅限依賴關係管理):




org.springframework.cloud
spring-cloud-dependencies
Greenwich.RELEASE
pom
import



org.springframework.cloud
spring-cloud-starter-config


org.springframework.cloud
spring-cloud-starter-netflix-eureka-client

...

如果使用 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'
...
}
相关文章