2. Jakarta EE 9
The most important change might be the jump from Java EE to Jakarta EE9, where the package namespace changed from javax.* to jakarta.*. As a result, we need to adjust all imports in our code whenever we use classes from Java EE directly.
3. Spring native
Spring Native is also a major feature of the upgrade. It supports using GraalVM to compile Spring applications into locally executable image files, which can significantly improve startup speed, and peak performance, and reduce memory usage.
Our traditional applications are compiled into bytecode, then interpreted by, JVM and finally compiled into machine code to run, while Spring Native is compiled into machine code in advance through AOT, and statically compiled into executable files directly at runtime. Depends on the JVM.
4. More dependencies upgrades
Spring Framework 6 and Spring Boot 3 need the following minimum versions:
- Kotlin 1.7+
- Lombok 1.18.22+ (JDK17 support)
- Gradle 7.3+
5. Prepare your migration
There are a few hints for project migration that we should know. The recommended steps are:
- Migrate to Spring Boot 2.7 first (The migration guide based on Spring Boot 2.7)
- Check for deprecated code usage, it will be removed with the new major release
- Migrate to Java 17
- Check third-party projects to have Jakarta EE 9 compatible releases