Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of adopting Java17 in SpringFramework6

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

SpringFramework6 uses Java17's example analysis, and I believe that many inexperienced people are at a loss about it. Therefore, this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

Spring Framework 6 will adopt Java 17 and Jakarta EE 9

As announced at SpringOne yesterday, Spring Framework 6 and Spring Boot 3 plan to achieve a high-end baseline of overall availability in the fourth quarter of 2022:

Java 17 + (from Java 8-17 in Spring Framework 5.3.x line)

Jakarta EE 9 + (from Java EE 7-8 in line 5.3.x of Spring framework)

This forward-looking baseline will bring great benefits to our APl design and integration efforts, and it will bring light to your application code and framework as well as your application for many years to come. However, this certainly comes at a price: Spring Framework 6 and Spring Boot 3 applications require at least JDK 17 and Tomcat 10 / Jetty 11 (for compatibility with Jakarta EE 9). More importantly, you may need some changes in your application source code: for example, javax to jakarta namespace changes in jakarta EE 9, no matter where you come into contact with Servlet API, JPA, Bean Validation, and so on.

While this may sound aggressive at first, remember, we're talking about the release in the fourth quarter of 2022: not only will JDK 17 replace JDK 11 as the next long-term supported version, but it will also be replaced by JDK 18 and JDK 19 as feature versions available at the time, while JDK 20 features are nearly frozen.

The same goes for Jakarta EB 9: we expect Jakarta EE 10 to be launched at that time, while another generation of Tomcat, Jetty, and co will be supported as run-time options. Keep the above baseline as a minimum, which allows you to learn more about the development of Java in Spring Framework 6.x, and Java 17 and Jakarta EE 9 are just the beginning.

At the same time, Spring Framework 5.3.x and Spring Boot 2.x are still under active development. Spring Boot 2.6will be launched in November this year, followed by Spring Boot 2.7in May 2022. The latest Spring Boot 2.x feature branch has arrived (it has not been determined whether this is 2.7 or a possible later version), which will enter the extended open source maintenance phase with Spring Framework 5.3. In parallel with Spring Framework 6 and Spring Boot 3, there is several years of overlap. Consider our previous branches of Spring Framework 3.2.x and 4.3.x to see how it will be implemented in practice.

So, if you plan to continue using JDK 8 or 11 for more than a few years, or even if you plan to continue using the Spring Framework 5.3 infrastructure on JDK17 for a few years, please rest assured that our extended maintenance of Spring Framework 5.3.x and Spring Boot 2.x is possible and will allow you to overwrite.

Once you are ready to use the Java ecosystem of next-generation applications, upgrade to Spring Framework 6 and Spring Boot 3 at your own pace, with the benefits of new infrastructure and new buildings in Tomcat, Jetty and co-- becoming available options. We hope you will appreciate these choices in the next few years.

Note: if you want to know the generation of JDK 11 as a LTS, please note that the commercial support time frame of JDK 11 is shorter than that of JDK 8, and the LTS of JDK 11 will be phased out by the end of 2023. JDK 17, as the next generation LTS, will provide a support time frame until at least 2026. We believe that JDK 8 has a unique role in the ecosystem.

By contrast, JDK 11 is just a transitional version. In addition, JDK 17 provides a recently accumulated set of language, API, and JVM enhancements that make it a more attractive upgrade. Equally important, in the same Spring Framework 6.x, JDK 23 LTS (2024) and JDK 29 LTS (2027) will still be supported, and eventually a wider range of support will be available for JDK 17-29.

After reading the above, have you mastered the method of example analysis of SpringFramework6 using Java17? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report