Spring Cloud 2022 is released, these components will be removed!

Following SpringBoot 3.0 and SpringFramework 6.0, Spring Cloud has finally launched a new version - 2022.0.0, which is named Kilburn on the official website .

picture

At present, it can be downloaded and used in the Maven warehouse, and can be relied on in the project through the POM file:

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

picture

Minimum dependency

Spring Cloud 2022.0.0 is  a major version built on Spring Framework 6.0 and Spring Boot 3.0 . Therefore, his requirements for JDK are also that the minimum requirement is Java 17 , and the minimum requirement for J2EE is Jakarta EE 9 .

Component upgrade

The component versions in Spring Cloud 2022.0.0 are as follows:

picture

Remove CLI and Cloudfoundry

In this upgrade, the two modules Spring Cloud CLI and Spring Cloud Cloudfoundry are removed.

Spring Boot CLI is a command line tool for rapid development with Spring. It allows running Groovy scripts, which are similar to java code without any boilerplate code. Spring CLI helps bootstrap new projects or write custom commands.

Spring Cloud for Cloudfoundry makes it easy to run Spring Cloud applications in Cloud Foundry . Cloud Foundry has the concept of "services", which are middleware that "bind" to an application, essentially providing it with environment variables containing credentials.

Add support for AOT and Native

In " SpringBoot 3.0 is officially released, there are several new changes! 》We have introduced that the two important upgrades in Spring Boot 3.0 are the support for AOT compilation and the introduction of Spring Native.

In this upgraded SpringCloud 2.0.0, multiple components have also added support for AOT and Native , such as Spring Cloud Function, Spring Cloud Stream, Spring Cloud OpenFeign, Spring Cloud Commons, Spring Cloud Consul, and Spring Cloud Gateway, etc. .

There are many components in this upgrade, mainly "Added support for AOT & native"!

OpenFeign no longer adds new features

Since Spring now provides its own interface HTTP client solution , starting from 2022.0.0, Spring Cloud OpenFeign will be considered feature-complete. This means that the Spring Cloud team will no longer add new features to the module. Only bugs and security issues will be fixed.

In 2022.0.0, some optimizations and upgrades have also been made to OpenFeign:

  • OAuth2 support migrated to Spring Security OAuth2 client

  • feign.autoconfiguration.jackson.enabled default value changed to true

  • Jackson Autoconfiguration is set to on by default

  • Removed previously deprecated constructors and methods

  • In keeping with changes in the Spring Framework, support for Apache HttpClient 4 has been removed and Apache HttpClient 5 will be used instead.

  • Added support for AOT and native images, as AOT compilation and Spring Native are important upgrades in Spring Framework 6.0.

  • Upgrade to Feign 12.0

Maybe in the next major version, Spring Cloud OpenFeign may also be removed.

Netflix upgrades Eureka 2.0.0

Eureka is updated to 2.0.0 . Eureka 2.0.0 is a new branch of Eureka and has nothing to do with the old 2.x-archive branch experiment from 7 years ago. The new 2.x branch is for compatibility with JakartaEE, which also makes Spring Cloud Netflix compatible with Spring Framework 6.0 and Spring Boot 3.0.

At the same time, this version upgrade also migrates Apache HttpClient to Apache HC5 HttpClient.

Summarize

The above mainly helps you sort out the new features of the newly released Spring Cloud 2022.0.0. In fact, you can see that the main thing is to be compatible with Spring Framework 6.0 and SpringBoot 3.0.

When writing this article, I went to see whether Spring Cloud Alibaba, Spring Cloud AWS, Spring Cloud Tencent and other projects have also been updated accordingly.

It turns out that Spring Cloud Alibaba, Spring Cloud AWS, and SpringCloud Tencent have made relevant updates, and relevant instructions are provided in the documentation.

picture

Figure: Spring Cloud Alibaba’s README

PS: However, I found a clerical error: Spring Cloud 2022 was written as Spring 2022 in the English version of the readme, while the Chinese version of the readme was correct.

picture

Figure: README of Spring Cloud AWS

So here comes the question. The minimum version requirement for JDK for the new version of Spring is Java 17. So, are you ready to upgrade?

Supongo que te gusta

Origin blog.csdn.net/2301_78586758/article/details/131815293
Recomendado
Clasificación