

Spring Boot 3 and Spring Framework 6 Use Java 17 and Jakarta EE 9, Support Nativ...
source link: https://www.infoq.com/news/2022/11/spring-6-spring-boot-3-launch/?itm_source=infoq&itm_medium=popular_widget&itm_campaign=popular_content_list&itm_content=
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Spring Boot 3 and Spring Framework 6 Use Java 17 and Jakarta EE 9, Support Native Java with GraalVM
Nov 24, 2022 3 min read
VMware released the long-anticipated Spring Framework 6 and Spring Boot 3. After five years of Spring Framework 5, these releases start a new generation for the Spring ecosystem. Spring Framework 6 requires Java 17 and Jakarta EE 9 and is compatible with the recently released Jakarta EE 10. It also embeds observability through Micrometer with tracing and metrics. Spring Boot 3 requires Spring Framework 6. It has built-in support for creating native executables through static Ahead-of-Time (AOT) compilation with GraalVM Native Image.
Michael Minella, senior director of software engineering at VMware, told InfoQ:
Spring has taken the approach of enabling Spring developers to build on their existing expertise to achieve the benefits of native compilation without significant changes, something unique in the ecosystem.
VMware announced Spring Framework 6 and Spring Boot 3 at its SpringOne 2021 conference. For the first time since 2010, a Spring Framework update followed not one, but two years after the previous major release - version 5.3 in 2020. In a recent interview, Josh Long, Java Champion and Spring Developer Advocate at VMware, discussing the extended development time for Spring Framework 6, stated:
"The migration to Jakarta EE has been challenging for us as framework developers", "the work for observability has also been widespread", and "the work for Ahead-of-Time (AOT) compilation with GraalVM Native Image [...] has been in the works in some form or another since at least 2019".
For more insights into the making of these two releases, please see the related interview with Josh Long.
Supporting Jakarta EE 10 makes Spring Framework 6 compatible with the latest web servers, such as Tomcat 10.1, Jetty 11, and Undertow 2.3. Spring Framework 6 also simplifies HTTP requests by defining them in so-called HTTP interfaces, like Spring Data JPA simplifies database queries through repository interfaces. HTTP error messages are now more helpful with RFC 7807 problem details.
As a preview feature, Spring Framework 6 can use the virtual threads from Project Loom on Java 19. Virtual threads and the associated structured concurrency API simplify concurrent programming in Java and make it more efficient to run. Unlike Oracle, Spring sees virtual threads complementing reactive programming, not replacing it.
Notable dependency upgrades in Spring Framework 6 include Kotlin 1.7, Hibernate ORM 6.1, Jackson 2.14 for JSON and XML parsing, and R2DBC 1.0 for reactive database access.
As InfoQ reported last year, support for the Java Platform Module System (JPMS) in Spring Framework 6 was originally planned but never came to fruition. However, the decision was made to delay support for JPMS:
Spring Framework 6.0 strongly focuses on AOT and GraalVM native images for optimizing the deployment arrangement of Spring-based applications. [...] There have been very few requests for it [module support] in the course of this year. [...] Deeper module system alignment remains part of our long-term technology strategy for the Spring Framework 6.x generation.
The OpenJDK Project Leyden plans to optimize Java and relies on JPMS and the jlink
linking tool. Without JPMS support, Spring applications couldn't use these optimizations.
The highlight of Spring Boot 3 is support for producing native executables. These executables start faster, use less memory, have smaller container images, and are more secure. That makes Java more competitive in the cloud. The frameworks Quarkus, Micronaut, and Helidon made native executables popular in Java. InfoQ recently published a six-piece article series on this topic. When the GraalVM Native Image compiler is installed on a developer's machine, creating a native executable with Spring Boot 3 is as simple as ./mvnw -Pnative package
or ./gradlew nativeCompile
. More details may be found in this blog post.
Jakarta EE 9 changed the Java namespace from javax.*
to jakarta.*
. This requires changes to existing Spring and Spring Boot applications if they import Jakarta EE types like annotations, validations, or JPA. That's why the recently introduced Spring Boot Migrator project is "working on [an] automated upgrade from Spring Boot 2.7 to Spring Boot 3.0."
VMware shortened the commercial and open-source support duration for Spring Framework 6. As Juergen Hoeller, Spring Framework project lead at VMware, put it:
The expectation is that people upgrade to the latest 6.x feature releases more quickly.
In contrast, the free support duration for Spring Boot 3.0 remains at one year.
VMware will discuss its new releases at its virtual SpringOne conference from January 24-26, 2023, that was originally planned as an on-site conference for December 2022.
About the Author
Karsten Silz
Karsten Silz has worked as a full-stack Java developer (Spring Boot, Angular, Flutter) for 23 years in Europe and the US. In 2004, he co-founded a software product start-up in the US. Karsten led product development for 13 years and left after the company was sold successfully. Since 2003, he has also worked as a contractor. He co-founded the SaaS start-up "Your Home in Good Hands" as CTO in the UK in 2020.
Show moreRecommend
-
69
-
20
@DynamicPropertySource in Spring Framework 5.2.5 and Spring Boot 2.2.6 Recently, when talking about testing Spri...
-
37
Java and Spring Boot multiline log support for Fluentd (EFK stack) October 12, 2020October 12, 2020 / by Author Arnold Galovics For a well-functioning application deve...
-
12
BlueWallet - A Bitcoin & Lightning Wallet Thin Bitcoin Wallet. Built with React Native and Electrum. Website: bluewallet.io Community: telegram g...
-
5
The Making of the Kosher Phone To understand what a Kosher phone is, one must first understand what a feature phone (aka dumb phone) is. A feature phone is a phone that is usually sold for a very cheap price (up to 50$) and it lets the proud...
-
3
一年一度的SpringOne大会在9月1日至2日因为疫情原因在线上举行。Pivotal公司(Spring项目拥有者)每年都会举办一次这样的大会,与全球数千位开发人员、客户和合作伙伴相聚在一起,交流技术实践经验,探讨技术的发展趋势。同时每次大会也会披露Spring项目下一步...
-
7
Spring 官宣,Spring Framework 6 和 Spring Boot 3 蓄势待发!今日推荐:...
-
8
Java News Roundup: NetBeans 15, Jakarta EE 10, jtreg 7, Spring Cloud, Groovy, Helidon, Micronaut Se...
-
6
Spring Framework 6 and Spring Boot 3 Released – Adam Gamboa G – Developer Skip to content
-
7
Spring Boot 3.0 Indubitably Rocks With Java 19 SupportSpring Boot 3.0 and Java 19? Am I dreaming? 🎶
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK