Spring Boot 3.0 is ready, are you ready?

Spring, the king of Java microservice development framework

In April 2014, Spring Boot 1.0.0 was officially released. More than 9 years have passed since the release of version 1.0. Today, Spring Boot has been widely used by Java developers. As mentioned in JRebel's 2022 Developer Productivity Report, Spring Boot has become the first choice for developing microservices in Java. framework and takes a dominant position.

Spring Boot core features

 

·  Follow the core idea that convention is greater than configuration.

·  You can not use XML configuration at all, just use automatic configuration and Java Config method.

·  Embedded Servlet container reduces dependence on the environment and greatly reduces learning costs.

·  Dependency management, Spring Boot provides a starter mechanism, which greatly simplifies Maven configuration.

·  Application observability, Spring Boot provides an observable solution for current applications.

·  For Spring automatic assembly, Spring Boot will automatically assemble beans for the classes in the jar package.

From Spring Boot version 1.0 in 2014 to version 2.0 in 2018, to version 3.0 in November 2022. Each major version upgrade will bring new features and functions. Spring Boot 3.0 can be called the beginning of Spring's new generation framework, and it is also the new beginning of Spring's next decade. Next, let us learn about Spring Boot 3.0.

Spring Framework 6.0 和 Spring Boot 3.0

In November 2022, Spring Framework 6.0 was officially released, and Spring ushered in major improvements. The upgrade content includes using Java 17 as the baseline, Jakarta EE9+, AOT support, etc.

One week after the official release of Spring Framework 6.0, Spring Boot 3.0 was officially released, bringing many new features. Overall, the main highlights are as shown in the figure below:

1. Java version improvement, Java 8 is no longer supported, Java 17 is used as the baseline, and Spring Framework 6.0 is used as the cornerstone.

2. Through Spring Native, Spring can no longer rely on the Java virtual machine, but uses GraaIvm to compile Spring applications into native images, thus providing a new way to deploy Spring applications, comparable to the Java virtual machine. Than, native image can provide more economical and sustainable hosting for many types of workloads. These include microservices, functional workloads that are well-suited for containers, and Kubernetes. At the same time, there is almost no modification to the business code level, and it supports Java and Kotlin. Using native image has some key advantages, such as instant startup, instant peak performance and reduced memory consumption.

3. Improvement of observability, based on Micrometer’s built-in observability.

4. From Java EE to Jakarta EE9, the package name space is from javax.* to jakarta.*. Therefore, whenever we use a class from JavaEE directly, we need to adjust all the imports in the code.

 

Generally speaking, compared with the Spring 2.x version, the advantages of Spring Boot 3.0 are as follows:

·  Faster startup, quick response to expansion needs, and faster response to user requests.

·  Supports Native mode, which is more suitable for local cloud computing, especially serverless computing, saving resource costs.

·  Less memory requirements.

·  Improve security and observability.

Spring Boot 2.7 community open source version will soon end support

Spring Boot 2.0 is the first version of the Spring Boot 2.x series, which was released in February 2018. 2.7 is the last major version of the Spring Boot 2.x series. More than four years have passed since the first release of the 2.x series in February 2018. With the release of Spring Framework 6 and Spring Boot 3.0 in November 2022, open source support for Spring Boot 2.7 will also be released. Ending in November 2023.

 

The upcoming cessation of open source support for Spring Boot 2.7 version may bring the following potential risks:

·  Due to the lack of continuous bug fixes and security updates, applications may have program vulnerabilities.

·  There may be non-compliance and security risks in the future.

·  Subsequently, the workload of developers to fix OSS errors has increased.

If you want to upgrade an existing version (such as Spring Boot 2.7 or earlier) and try to use Spring Boot 3.0 and above, the following tips may help you

·  It is recommended that you first migrate existing Spring Boot projects to Spring Boot 2.7 version as much as possible (please ignore it if it is already Spring Boot 2.7 version).

·  Check usage of deprecated code and handling of legacy configuration files (it will be removed with the new major version).

·  Java version upgraded to Java 17.

·  Check whether third-party projects have Jakarta EE 9 compatible versions.

(For more information, please refer to: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide)

It can be seen that Spring officials have given some suggestions and guidance for version upgrades. These suggestions and guidance can help us very well and reduce problems caused during the version upgrade process. So what are the best practices for VMware as the manager of the Spring ecosystem, whether it is version upgrades or the use of Spring Boot 3.0? Next, let us understand VMware Spring's solution.

VMware Spring Solution

The overall VMware Spring solution can be divided into four parts:

Spring Consulting and Spring Solution Architect

Provide comprehensive consulting services for the Spring ecosystem. No matter where you are in your Spring journey, we'll help you unlock the full potential of your Spring applications.

1. Upgrade to the latest version of Spring

Say goodbye to tedious manual upgrades and adopt a streamlined approach that saves your organization valuable time and resources. VMware Tanzu Labs reduces the risk of running an outdated version of Spring Boot by ensuring seamless migration to the latest version. All while ensuring your applications are future-proof, secure, and compliant with industry standards.

2. Design, develop or modernize Spring applications

Speed ​​the delivery of the applications your business needs using the world's most popular Java framework. VMware Tanzu Labs, the most experienced Spring development team, has perfected our product development process through decades of practice. Our experts will work with your developers to accelerate delivery or build and deploy new Spring applications to take full advantage of Spring.

3. Migrate existing application portfolio to Spring

Move your application portfolio to the world's most popular Java framework and take advantage of the best that Spring has to offer. Our consultants at VMware Tanzu Labs will work with your organization to assess your application environment, identify possible roadblocks, and develop a roadmap for a successful migration process.

VMware Spring Runtime

VMware Spring Runtime provides you with 24/7 commercial support for the Spring ecosystem, allowing you to unlock the full potential of the Spring® ecosystem by connecting with experts. Including software package downloads, commercial technical support, product provision, etc.

Although the open source community will stop supporting Spring Boot 2.7 in November 2023, VMware will commercially support customers' Spring Boot 2.7 through the open source software of VMware Spring Runtime until February 2025.

For detailed information, please refer to: https://tanzu.vmware.com/spring-runtime.

Spring Academy

Through a large number of online courses and forums, as well as a large number of hands-on experiments, developers can gain an in-depth understanding of Spring's various features and can take the Spring professional technical certification exam. For detailed information, please refer to: https://spring.academy.

Reference links:

1.jrebel-2022-java-developer-productivity-report

2.https://spring.io/projects/spring-boot#support

3.https://tanzu.vmware.com/spring-consulting

4.https://tanzu.vmware.com/spring-runtime

5.https://spring.academy

6.https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide

Content source|Public account: VMware China R&D Center

If you have any questions, please scan the official account below to contact us~

Lei Jun: The official version of Xiaomi's new operating system ThePaper OS has been packaged. The pop-up window on the lottery page of Gome App insults its founder. Ubuntu 23.10 is officially released. You might as well take advantage of Friday to upgrade! Ubuntu 23.10 release episode: The ISO image was urgently "recalled" due to containing hate speech. A 23-year-old PhD student fixed the 22-year-old "ghost bug" in Firefox. RustDesk remote desktop 1.2.3 was released, enhanced Wayland to support TiDB 7.4 Release: Official Compatible with MySQL 8.0. After unplugging the Logitech USB receiver, the Linux kernel crashed. The master used Scratch to rub the RISC-V simulator and successfully ran the Linux kernel. JetBrains launched Writerside, a tool for creating technical documents.
{{o.name}}
{{m.name}}

Guess you like

Origin my.oschina.net/u/4238514/blog/10120132