Preparing the application
On each version of Spring Boot, some components are marked for deprecation, and normally, there is a proposal for change to avoid the deprecated components. As upgrading from Spring Boot 2 to Spring Boot 3 is a major change, upgrading to the latest Spring Boot 2 version is strongly recommended.
Before migrating an application to Spring Boot 3, the following preparation is recommended:
- Upgrade the Spring Boot version to the latest 2.7.x available. At the time of writing this book, it is 2.7.18. This will facilitate the upgrade to Spring Boot 3
- Update the Java version to Java 17, the minimum supported version in Spring Boot 3.
- Address all deprecated components.
In this recipe, we’ll prepare a sample application that uses Spring 2.6 and Java 11. By the end of the recipe, the application will use Spring 2.7.18, Java 17, and all deprecated components and APIs will be addressed.
Getting ready
You will prepare an application...