关于java:终于Spring-Cloud-2021-正式发布一大波更新看完我彻底躺平了

8次阅读

共计 3037 个字符,预计需要花费 8 分钟才能阅读完成。

Spring Cloud 2021.0.0

号外,号外,Spring Cloud 2021.0.0 公布了!

间隔上一版的《Spring Cloud 2020.0.4》也有一些日子了,栈长掐指一算,差不多 2 个多月吧。

当初在 Maven 仓库中曾经可用了:

Maven 依赖给大家奉上:

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

话说 2021 都快过完了,怎么到当初才公布 2021 的版本,这是什么梗?

Spring Cloud 这公布速度的确比较慢,不像 Spring Boot,Spring Cloud 上面的子项目太多了,相当于 N 个 Spring Boot,自身还要兼容新版 Spring Boot,所以进度天然不如简略的 Spring Boot 版本进度快。

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

能够看到,Spring Cloud 目前保护着三条版本主线:

  • Spring Cloud 2021.x
  • Spring Cloud 2020.x
  • Spring Cloud Hoxton.x

对于这些版本线的命名是不是很奇怪?

其实 Spring Cloud 最新的版本命名形式早曾经变更了,当前就是 YEAR.x 这种命名形式了,不分明的能够看下栈长之前写的两篇文章:

  • Spring Cloud 2020.0.0 正式公布,全新颠覆性版本!
  • Spring Cloud 2020 版本重大改革,更好的命名形式!

所以说,尽管 Spring Cloud 2021.0.0 是以 2021 命名,但并不是说是 2021 年的公布的第一个版本,而是指 Spring Cloud 2021.x 版本线的第一个版本。


新个性解读

来看下 Spring Cloud 2021.0.0 更新了啥!

Spring Cloud 2021.0.0 是第一个反对 Spring Boot 2.6 的版本,并且与 Spring Boot 2.6.1 兼容。另外,Spring Cloud、Spring Boot 系列教程全副整顿好了,关注微信公众号 Java 技术栈,在公众号菜单中进行浏览,都是干货。

模块更新

模块 版本号
Spring Cloud Vault 3.1.0
Spring Cloud Bus 3.1.0
Spring Cloud Cli 3.1.0
Spring Cloud Zookeeper 3.1.0
Spring Cloud Circuitbreaker 2.1.0
Spring Cloud Commons 3.1.0
Spring Cloud Kubernetes 2.1.0
Spring Cloud Openfeign 3.1.0
Spring Cloud Task 2.4.0
Spring Cloud Sleuth 3.1.0
Spring Cloud Contract 3.1.0
Spring Cloud Consul 3.1.0
Spring Cloud Gateway 3.1.0
Spring Cloud Config 3.1.0
Spring Cloud Cloudfoundry 3.1.0
Spring Cloud Starter Build 2021.0.0
Spring Cloud Netflix 3.1.0

另外修复了一堆的 Bug,具体能够参考:

https://github.com/spring-clo…

次要更新内容

Spring Cloud Commons

  • 反对为每个 Load-balancer(负载平衡)配置参数,这个同时也增加到了 Gateway、Contract 和 Openfeign 我的项目中

Spring Cloud Config

  • 集成了 AWS Secrets Manager、AWS Parameter Store 和 GCP Secret Manager

Spring Cloud Gateway

  • 反对 Redis 路由存储库
  • 反对 HTTP 2
  • 反对 gRPC

Spring Cloud Kubernetes

  • 配置服务器和发现控制器

Spring Cloud Openfeign

  • 反对 @Cachable 缓存注解

Spring Cloud Sleuth

反对对上面技术的追踪:

Tomcat, Spring Vault, R2DBC, JDBC, Spring Cloud Deployer, Spring Cloud Skipper, Reactor Kafka, Spring TX, Spring Batch, RSocket, Spring Cloud Task, Spring Cloud Config, Kotlin Coroutines, ….

更多,不止于此。。

总结

Spring Cloud 2021.0.0 是一个大版本,反对 Spring Boot 2.6,更新了很多我的项目模块,看完我真的彻底躺平了,升不动了。。

最初来看下 Spring Cloud 兼容的 Spring Boot 版本状况:

版本线 生命周期 兼容 Spring Boot 版本
2022.x 未公布 Spring Boot 3.0
2021.x 未知 Spring Boot 2.6.1
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

须要留神的是,Spring Cloud Dalston, Edgware, Finchley, Greenwich 这几个版本曾经彻底完结生命周期了,官网不再提供保护反对。

另外 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 Cloud 版本呢?欢送投票!

好了,明天的分享就到这里了,前面栈长我会更新更多好玩的 Java 技术文章和最新的技术资讯,关注公众号 Java 技术栈第一工夫推送,不要走开哦。

版权申明: 本文系公众号 “Java 技术栈 ” 原创,原创实属不易,转载、援用本文内容请注明出处,剽窃者一律举报+投诉,并保留追究其法律责任的权力。

近期热文举荐:

1.1,000+ 道 Java 面试题及答案整顿 (2021 最新版)

2. 别在再满屏的 if/ else 了,试试策略模式,真香!!

3. 卧槽!Java 中的 xx ≠ null 是什么新语法?

4.Spring Boot 2.6 正式公布,一大波新个性。。

5.《Java 开发手册(嵩山版)》最新公布,速速下载!

感觉不错,别忘了顺手点赞 + 转发哦!

正文完
 0