<<Download>> Download Microsoft Word Course Outline Icon Word Version Download PDF Course Outline Icon PDF Version

Updated November 2026

Migrating to Spring Boot 4 with AI Coding Agents

Class Duration

7-14 hours of live training delivered over 1-2 days, depending on the depth of coverage and the number of services being migrated.

Student Prerequisites

  • Working experience building and maintaining Spring Boot 3.x applications
  • Comfort with Maven or Gradle builds and dependency management
  • Familiarity with JUnit and Spring's testing support
  • Experience with an AI coding assistant is helpful but not required

Target Audience

Java engineers, tech leads, and platform teams who own Spring Boot 3.x services and must move them to Spring Boot 4. It covers single services and upgrades across many services and internal starters. Engineers new to Spring Boot should start with Java with Spring Boot: Secure REST APIs.

Description

This course gives teams a repeatable path from Spring Boot 3.x to Spring Boot 4 and Spring Framework 7. Open-source support for Spring Boot 3.5 ended on June 30, 2026, and 3.5.16 was the last open-source release. Spring Boot 4 moves to Jakarta EE 11 and Jackson 3, adopts JSpecify, splits auto-configuration into modular starters, and drops Undertow. Students build a test safety net, upgrade dependencies in order, and automate the mechanical changes with OpenRewrite. AI coding agents then work through the remaining compile errors and test failures, with the build and tests checking every change.

Learning Outcomes

  • Assess the migration effort for a Spring Boot 3.x service.
  • Build a safety net of characterization and serialization tests.
  • Sequence the upgrade from the latest 3.5.x to Spring Boot 4.
  • Run and customize OpenRewrite recipes for Spring Boot 4.
  • Move to the new modular starters.
  • Migrate JSON handling to Jackson 3 without breaking clients.
  • Adopt JSpecify null-safety annotations.
  • Update tests for @MockitoBean, MockMvc, and RestTestClient.
  • Verify agent-made changes with builds, tests, and contract checks.
  • Plan upgrades across many services and internal starters.

Training Materials

All students receive comprehensive courseware covering all topics in the course. Courseware is distributed via GitHub in the form of documentation and extensive code samples.

Software Requirements

Students will need a free, personal GitHub account to access the courseware. Students will need permission to install a JDK (Java 25 LTS recommended; Spring Boot 4 requires Java 17 or later), Maven or Gradle, Docker or another container runtime for Testcontainers, and IntelliJ IDEA or Visual Studio Code with Java extensions. Examples migrate from Spring Boot 3.5 to the current Spring Boot 4.x release. Students will also need access to an AI coding agent such as Claude Code, GitHub Copilot, or Cursor. If students are unable to configure a local environment, a cloud-based environment can be provided.

Training Topics

Why Migrate, and When

  • End of open-source support for Spring Boot 3.5
  • Commercial support vs. upgrading
  • Support windows for 4.x releases
  • Estimating migration effort
  • Test coverage and third-party dependencies

What Changed in Spring Boot 4 and Spring Framework 7

  • Java 17 baseline, Java 25 recommended
  • Kotlin 2.2 baseline
  • Jakarta EE 11 and Servlet 6.1
  • JPA 3.2 and Bean Validation 3.1
  • Undertow removed
  • Choosing between Tomcat and Jetty
  • Modular auto-configuration and starters
  • JSpecify replacing Spring's nullness annotations
  • Removed 3.x deprecated APIs
  • Built-in API versioning
  • Resilience annotations such as @Retryable
  • HTTP service client groups
  • Moving from RestTemplate to RestClient

Upgrade Order

  • Latest Spring Boot 3.5.x first
  • Clearing deprecation warnings
  • JDK and build plugin upgrades
  • Spring Security and Spring Data together
  • The Spring Cloud release train
  • Unmanaged dependencies
  • springdoc-openapi and Hibernate extensions
  • Renamed properties with spring-boot-properties-migrator

Modular Starters

  • The new starter naming scheme
  • Matching test starters
  • spring-boot-starter-webmvc
  • Security OAuth2 starter renames
  • Classic starters as a stepping stone
  • Flyway and Liquibase starters
  • Spring Batch starter changes

Jackson 3

  • New tools.jackson group IDs and packages
  • Unchanged jackson-annotations
  • JsonMapper and JsonMapperBuilderCustomizer
  • @JacksonComponent and @JacksonMixin
  • Properties under spring.jackson.json
  • spring.jackson.use-jackson2-defaults
  • The deprecated Jackson 2 fallback module

Data, Security, and Web Changes

  • Hibernate 7 and JPA 3.2
  • Spring Security 7 lambda-only DSL
  • Removed Spring Security APIs
  • RestClient and WebClient starters
  • Message converter customization
  • MongoDB and session property moves
  • Persistence property moves

Testing Before, During, and After

  • Characterization tests for critical endpoints
  • Contract tests and JSON snapshots
  • Testcontainers and @ServiceConnection
  • @MockBean to @MockitoBean
  • @SpyBean to @MockitoSpyBean
  • @AutoConfigureMockMvc for MockMvc
  • @AutoConfigureTestRestTemplate
  • RestTestClient
  • Replacing JUnit 4 SpringRunner
  • Startup and health-probe checks
  • Performance and native-image checks

Automating with OpenRewrite

  • Lossless semantic trees and recipes
  • The UpgradeSpringBoot_4_0 recipe
  • The MigrateToModularStarters recipe
  • Maven and Gradle plugins
  • Dry runs and diff review
  • Committing in stages
  • Declarative recipes for internal frameworks
  • What recipes cannot do

Migrating with AI Coding Agents

  • Compile-error triage
  • Removed-API replacements
  • Test repairs and diff explanations
  • Recipes first, agents second
  • A written migration spec
  • Migration guide and release notes as context
  • Build, test, and run after each change
  • Small commits on a migration branch
  • No deleted tests or suppressed warnings
  • Behavior shifts in JSON and null handling
  • Security rule changes

Portfolio Migrations

  • Inventorying services and versions
  • Parent POMs, BOMs, and internal starters
  • Recipes and agents across repositories
  • Tracking progress and stragglers
  • Canary releases and rollback
<<Download>> Download Microsoft Word Course Outline Icon Word Version Download PDF Course Outline Icon PDF Version