Upgrading from Spring Boot 2.7 to 3.1

Intermediate
21 Lessons
2h 57m

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.

Share:

What's covered in this course?

  • Upgrading an application from Spring Boot 2.7.x to 3.1.x
  • Common pitfalls and gotchas (known knowns)

Why should I upgrade my Spring Boot version?

  • 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.

Prerequisites

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

Course Outline

Introduction

Introduction

What is the general approach you should take to a Spring Boot 2.7 to 3.1 upgrade?

Article
5m
Preparing to upgrade
Locked

Preparing to upgrade

Learn how to prepare for the upgrade.

Article
15m
Assess
Locked

Assess

Learn how to assess your Spring Boot 2.7 application so you start from a known good state.

Article
5m
Lab: Compile the Application
Locked

Lab: Compile the Application

Let's get our sample application compiling so we can start the upgrade.

Lab
10m
Assess Major Release Upgrade Considerations
Locked

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.

Article
5m
Lab: Major Release Considerations
Locked

Lab: Major Release Considerations

Let's make any required changes to prepare/support an easy transition for this major release upgrade.

Lab
15m
Update the base Spring Boot version
Locked

Update the base Spring Boot version

Upgrading the base Spring Boot version is the first change you'll make in any upgrade.

Article
8m
Lab: Update the base Spring Boot Version
Locked

Lab: Update the base Spring Boot Version

Update the spring-boot-starter-parent version in pom.xml

Lab
5m
Update Spring and Spring Boot dependencies
Locked

Update Spring and Spring Boot dependencies

Keep your Spring and Spring Boot dependencies in sync.

Article
5m
Lab: Update the Spring/Spring Boot dependencies
Locked

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.

Lab
6m
Update non-Spring dependencies
Locked

Update non-Spring dependencies

Update/clean-up your non-Spring dependencies.

Article
7m
Lab: Update the Non-Spring Dependencies
Locked

Lab: Update the Non-Spring Dependencies

Update the non-Spring dependencies in our sample project.

Lab
10m
Spring Security considerations
Locked

Spring Security considerations

Spring Security is its own special beast to wrangle!

Article
15m
Lab: Update Spring Security version
Locked

Lab: Update Spring Security version

You'll tackle upgrading Spring Security as its own dedicated effort.

Lab
15m
Run local tests
Locked

Run local tests

Now that our application is upgraded to Spring Boot 3.1, it's time to get the tests passing.

Article
5m
Lab: Fixing tests and housekeeping
Locked

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!

Lab
7m
Migrating from JUnit 4 to JUnit 5 (Jupiter)
Locked

Migrating from JUnit 4 to JUnit 5 (Jupiter)

Migrating from JUnit 4 to JUnit 5 is worth considering.

Article
5m
Deprecated Properties & Runtime Errors
Locked

Deprecated Properties & Runtime Errors

Dealing with deprecated properties and tricky runtime errors.

Article
5m
Lab: Deprecated Properties & Runtime Errors
Locked

Lab: Deprecated Properties & Runtime Errors

Let the Spring Boot Property Migrator show you the way to property-fix bliss.

Lab
5m
Testing for Parity
Locked

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.

Article
5m
Release - Ship It!
Locked

Release - Ship It!

You're not done until your upgraded application is running well in Production.

Article
5m