Spring Cloud Greenwich 正式版在 01/23/2019 這天正式發布了,下面我們來看下有哪些更新內容。
生命周期終止提醒
Spring Cloud Edgware
Edgware 版本將於 08/01/2019 正式退役,具體可以參考官方宣布:
https://spring.io/blog/2018/07/30/spring-cloud-edgware-eol-aug-1st-2019
Spring Cloud Finchley
Finchley 版本作為 Spring Boot 2.0.x 的主要版本,Finchley 的生命周期也會由 Spring Boot 2.0.x 版本的終止而終止。
Spring Cloud Greenwich
Greenwich 版本現在作為一個次要版本,它后續將繼續支持 Spring Boot 2.x 的發布支持。
分不清這些版本的區別和意義?可以參考棧長之前寫的關於版本的文章:
Spring Cloud 多版本怎么選擇?。
Greenwich 重大更新
兼容JDK
這個最新版本的發布最重要的一點是,所有的子項目都兼容 Java 11。
新項目
1、Spring Cloud GCP
提供對 Google Cloud Platform 的集成。
2、Spring Cloud Kubernetes
提供對 Kubernetes 的集成。
Spring Cloud Netflix 進入維護模式
最近,Netflix 宣布 Netflix 進入維護模式:《Hystrix 停止開發。。。Spring Cloud 何去何從?》,Ribbon 自 2016 年以來也一直處於類似的狀態,盡管它們已經進入維護模式,但它們在 Netflix 內部已經大規則部署應用。
另外,Hystrix Dashboard 和 Turbine 已經被 Atlas 取代,這兩個項目最后一次的代碼提交分別是 2 年前和 4 年前了。Zuul 1 和 Archaius 1 也已經被后續的版本取代,不再向后續版本兼容。
以下 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 或者 concurrency-limits 模塊。
什么是維護模式?
這些個項目進入維護模式后,Spring Cloud 團隊也不會往這些模塊添加新功能了,但是還是會修復一些 bug 及安全漏洞,也會考慮和審查來自社區的小規模拉取請求。
Spring Cloud Greenwich 版本在這些維護模式的項目上至少會支持 1 年。
有什么替換方案?
官方推薦了以下替代方案,也許在不久的將來,或者下一個大版本這些替代方案會成為主流項目。
目前的 | 可替換 |
---|---|
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 |
這個版本除了以上重大更新,還有一些子項目的版本更新、問題修復等,這里就不詳細分析了,大家有興趣的可以去看官方發布博文:
https://spring.io/blog/2019/01/23/spring-cloud-greenwich-release-is-now-available
如果你也在使用 Spring Cloud 搭建微服務,可以關注Java技術棧微信公眾號,在后台回復關鍵字:spring,棧長整理了一系列 boot/ cloud 技術文章,都是干貨。
本文原創首發於微信公眾號:Java技術棧(id:javastack),關注公眾號在后台回復 "spring" 可獲取更多,轉載請原樣保留本信息。