說明
2019年1月23日,Spring Cloud創始人Spencer Gibb在博客發佈了Spring Cloud Greenwich版本正式發版的消息,可以在 Spring Milestone 和 Maven Central 庫獲取到,現在來看看Greenwich有哪些變化。
2020年2月1號,發佈Spring Cloud Service Release 5 (SR5) 發佈。
Spring Cloud Greenwich Release 記錄
End of Life (EOL) 提醒
Edgware版本將於2019年8月1日達到EOL狀態。
官網:https://github.com/Netflix/Hystrix
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有哪些新變化
Spring Cloud所有的項目都進行了更新,以實現Java 11的兼容性。並且Greenwich 版本有兩個新項目,Spring Cloud GCP(提供與Google Cloud Platform的集成)和Spring Cloud Kubernetes(提供與Kubernetes的集成)。
Spring Cloud Netflix項目進入維護模式
最近,Netflix宣佈Hystrix正在進入維護模式(不再添加新功能,只修復bug)。 自2016年以來,Ribbon已處於類似狀態。雖然Hystrix和Ribbon現在處於維護模式,但它們仍然在Netflix上大規模部署。
Hystrix Dashboard和Turbine已被Atlas取代。以下Spring Cloud Netflix模塊將進入維護模式:
- spring-cloud-netflix-archaius
- spring-cloud-netflix-hystrix-contract
- spring-cloud-netflix-hystrix-dashboard
- spring-cloud-netflix-hystrix-stream
- spring-cloud-netflix-hystrix
- spring-cloud-netflix-ribbon
- spring-cloud-netflix-turbine-stream
- spring-cloud-netflix-turbine
- spring-cloud-netflix-zuul
這不包括Eureka或併發限制模塊。
替代組件
不過不用慌張,雖然netflix絕大部分組件已經進入維護模式,但是Spring Cloud團隊開發了一些新的組件去取代這些組件。
當前組件 | 可取代的組件 |
---|---|
Hystrix | Resilience4j |
Hystrix Dashboard / Turbine | Micrometer + Monitoring System |
Ribbon | Spring Cloud Loadbalancer |
Zuul 1 | Spring Cloud Gateway |
Archaius 1 | Spring Boot external config + Spring Cloud Config |
下面來看一下Greenwich版本的主要變化。
Spring Cloud Sleuth
- 更新到了最新的Brave庫。
- WebFlux和Reactor集成的性能改進。
- 增加了GRPC組件
- 增加了對多個span reporter 支持。
- 增加了限速採樣器的支持。
Spring Cloud GCP
See the Google release announcement.
Spring Cloud Netflix
- 升級了Ribbon and Eureka 的版本
- 爲新的ServiceInstance.instanceId字段添加了支持。
Spring Cloud Consul
- 爲新的ServiceInstance.instanceId字段添加了支持。
Spring Cloud Gateway
- 添加了重寫響應頭過濾器。
- 在各自的路由predict中爲多個路徑和主機添加了支持,並自定義在某些情況下返回的HTTP狀態代碼。
Spring Cloud Kubernetes
- 你現在可以將ServiceInstance元數據配置爲來自Kubernetes Labels對象、Annotations對象和Ports對象。
- 在啓動期間使用KubernetesDiscoveryClient進行了增強。
- 添加了一個模塊來檢測Istio的存在。
Spring Cloud Security
添加了Spring Cloud Gateway 的一個過濾器去支持 OAuth2。具體可參考這個案例。https://github.com/spring-cloud-samples/sample-gateway-oauth2login
Spring Cloud Config
- 添加了EnvironmentRepository以支持CredHub後端。
Spring Cloud OpenFeign
- 支持了@QueryMap註解
- 升級到了OpenFeign版本爲10.1.0.
其他升級的組件比如Spring Cloud Commons、Spring Cloud 、VaultSpring Cloud Contract、Spring Cloud Task、Spring Cloud Zookeeper、Spring Cloud Stream、Spring Cloud Function見原文:https://spring.io/blog/2019/01/23/spring-cloud-greenwich-release-is-now-available
以下模塊作爲Greenwich.RELEASE版本進行了更新:
模塊 | 版本 |
---|---|
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 |
Spring Cloud Finchely版本發佈才半年多,Greenwich版本就發佈了,2019年11月28號發佈Hoxton。
參考
https://spring.io/team/spencergibb
https://mp.weixin.qq.com/s/YM02h32269Z4wxbKTz6y4w?
https://spring.io/blog/2019/11/28/spring-cloud-hoxton-released
https://spring.io/blog/2018/07/30/spring-cloud-edgware-eol-aug-1st-2019