Spring Cloud 最近版本更新:

号外,号外,Spring Cloud 2020.0.5 发布了!

现在在 Maven 仓库中已经可用了:

Maven 依赖给大家奉上:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>2020.0.5</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

Spring Cloud 2021.0.0 刚发布不久,2020.0.5 这条版本线又发布新版了。

来看下最新的 Spring Cloud 版本情况:

栈长写文时官方首页还没更新,不过没关系,可以看到,Spring Cloud 现在维护了三条线:

关于版本线的命名是不是很奇怪?

其实 Spring Cloud 最新的版本命名方式早已经变更了,以后就是 2020.x 这种命名方式了,不清楚的可以看下栈长之前写的两篇文章:

另外,Spring Cloud 系列教程全部整理好了,微信搜索关注Java技术栈,在菜单中进行阅读。

Spring Cloud 2020.0.5

来看下 Spring Cloud 2020.0.5 更新了啥!

以下模块得到了更新:

| Module | Version |
| Spring Cloud Netflix | 3.0.5 |
| Spring Cloud Config | 3.0.6 |
| Spring Cloud Sleuth | 3.0.5 |
| Spring Cloud Gateway | 3.0.6 |
| Spring Cloud Cloudfoundry | 3.0.3 |
| Spring Cloud Contract | 3.0.5 |
| Spring Cloud Kubernetes | 2.0.5 |
| Spring Cloud Zookeeper | 3.0.5 |
| Spring Cloud Cli | 3.0.4 |
| Spring Cloud Task | 2.3.5 |
| Spring Cloud Starter Build | 2020.0.5 |
| Spring Cloud Openfeign | 3.0.6 |
| Spring Cloud Vault | 3.0.5 |
| Spring Cloud Commons | 3.0.5 |

主要更新内容如下:

Spring Cloud Netflix

  • Netflix/Eureka 版本升级至 1.10.17

Spring Cloud Config

  • Git 仓库支持使用 HTTPS 代理
  • 支持 AWS、Redis、CredHub 仓库

Spring Cloud Gateway

度量增强:

  • 度量不包括 Netty 连接信息
  • 添加度量以包含路径作为网关度量标记
  • 添加度量以跟踪网关路由定义计数

Spring Cloud Kubernetes

  • 为 Kubernetes API 客户端指定用户代理
  • 允许不附加 activeProfile
  • Kubernetes Java 客户端升级到 11.0.3

Spring Cloud Openfeign

  • PageJacksonModule 模块中添加了对 size = 0 的支持

Spring Cloud Sleuth

  • 支持:Cache Executor wrappers

Spring Cloud Vault

  • 支持来自文件的 TOKEN 认证 (~/.vault_token)
  • 支持在 VaultConfigDataLoader 中使用 spring.cloud.vault.reactive.enabled 属性
  • 支持对多数据库的密钥生成

总结

Spring Cloud 2020.0.5 是一个小版本,这可能是 2021 年度发布的最后一个版本了,个人建议没必要升级,除非这些新特性对你真的有需要。

最后来看下 Spring Cloud 兼容的 Spring Boot 版本情况:

| 版本线 | 生命周期 | 兼容 Spring Boot 版本 |
| 2021.x | 停止时间未知 | Spring Boot 2.6 |
| 2020.x | 停止时间未知 | Spring Boot 2.4.x, 2.5.x (2020.0.3+) |
| Hoxton | 2022/02/28 | Spring Boot 2.2.x, 2.3.x (SR5+) |
| Greenwich | 已停止维护 | Spring Boot 2.1.x |
| Finchley | 已停止维护 | Spring Boot 2.0.x |
| Edgware | 已停止维护 | Spring Boot 1.5.x |
| Dalston | 已停止维护 | Spring Boot 1.5.x |

需要注意的是:

1)2020 和 2021 版本支持的 Spring Boot 最新版本是不同的,2021 版本最新支持 Spring Boot 2.6,2020 版本最新只支持 Spring Boot 2.5,注意兼容性;

2)Spring Cloud Dalston, Edgware, Finchley, Greenwich 这几个版本已经彻底结束生命周期了,官方不再提供维护支持,别再用了;

3)Spring Cloud Hoxton 这个版本在 2021/06/30 也停止维护了(其对应的 Spring Boot 2.2.x 版本也停止维护了),但是期间如果 Hoxton 出现重大 bug 或者安全漏洞,补丁修复截止时间会延长到 2022/02/28。

学 Spring Cloud 必须先掌握 Spring Boot,如果你还没用过 Spring Boot,今天我就送你一份 《Spring Boot 学习笔记》这个很全了,包括底层实现原理及代码实战,非常齐全,助你快速打通 Spring Boot 的各个环节。

Spring Boot 理论和实战源码仓库:

https://github.com/javastacks/spring-boot-best-practice

你们用的哪个 Spring Cloud 版本呢?欢迎投票!

好了,今天的分享就到这里了,如果你想关注和学习最新、最主流的 Java 技术,可以持续关注公众号Java技术栈,公众号第一时间推送。

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注