Upgrading from Spring Boot 2.7 to 3.1
In this course, you'll learn the benefits of upgrading from Spring Boot 2.7 to Spring Boot 3.1, and master our systematic and pragmatic approach to the upgrade process. Not only that, you'll use our hands-on lab environment to perform a real Spring Boot 2.7 to 3.1 upgrade for each step.
- Upgrading an application from Spring Boot 2.7.x to 3.1.x
- Common pitfalls and gotchas (known knowns)
- Spring Boot 2.7 is End of Support 11/2023 (EOS)
- Spring Boot 3 is the foundation for Java and Spring development for the next decade. It supports:
- Java 17+
- Jakarta EE 9+
- Reduced memory footprint
- Native images
- Better observability
- Many more enhancements and improvements
- It's good practice to keep your applications up to date to mitigate security risks (CVEs), and code smells.
You should be familiar with the following before pursuing this Course:
- Experience developing applications with Java
- Familiarity with one or more of these Java versions (17)
- A working knowledge of Maven
- A working knowledge of Git
- A working knowledge of Spring 5.7
- A working knowledge of Spring Boot 2.7
What is the general approach you should take to a Spring Boot 2.7 to 3.1 upgrade?
Preparing to upgrade
Learn how to prepare for the upgrade.
Learn how to assess your Spring Boot 2.7 application so you start from a known good state.
Lab: Compile the Application
Let's get our sample application compiling so we can start the upgrade.
Assess Major Release Upgrade Considerations
Learn what to look for and how to prepare your code when performing an upgrade that crosses a
major release boundary.
Lab: Major Release Considerations
Let's make any required changes to prepare/support an easy transition for this
major release upgrade.
Update the base Spring Boot version
Upgrading the base Spring Boot version is the first change you'll make in any upgrade.
Lab: Update the base Spring Boot Version
Update the spring-boot-starter-parent version in pom.xml
Update Spring and Spring Boot dependencies
Keep your Spring and Spring Boot dependencies in sync.
Lab: Update the Spring/Spring Boot dependencies
Update and cleanup Spring Dependencies to ensure that explicit versioning is removed, allowing the Spring Dependencies BOM to ensure consistency and interoperability.
Update non-Spring dependencies
Update/clean-up your non-Spring dependencies.
Lab: Update the Non-Spring Dependencies
Update the non-Spring dependencies in our sample project.
Run local tests
Now that our application is upgraded to Spring Boot 3.1, it's time to get the tests passing.
Lab: Fixing tests and housekeeping
Getting the tests running after an upgrade to Spring Boot 3.1 can be a challenge, but now you have the skills and knowledge to get it done!
Migrating from JUnit 4 to JUnit 5 (Jupiter)
Migrating from JUnit 4 to JUnit 5 is worth considering.
Deprecated Properties & Runtime Errors
Dealing with deprecated properties and tricky runtime errors.
Lab: Deprecated Properties & Runtime Errors
Let the Spring Boot Property Migrator show you the way to property-fix bliss.
Testing for Parity
Now that the upgraded application actually runs, it's time to validate that it runs correctly, and at least as performantly as it did before the upgrade.