Skip to main content

Spring Kafka 3 to 4 Migration Guide

Moving a Spring application from Spring Kafka 3 to 4 looks like a version bump. It is three changes at once: the Kafka client itself jumps to 4.x, Spring Boot 4 stops configuring Kafka unless you use a new starter, and the JSON serializer you probably use is built on a Jackson that Boot 4 no longer puts on your classpath. This article migrates one small app and shows what each of those does when it goes wrong. You need to know what a Kafka topic, a producer and a consumer are. Everything else is explained as it appears. Versions tested. Before: Spring Boot 3.5.16, Spring Kafka 3.3.16, kafka-clients 3.9.2, JDK 21. After: Spring Boot 4.1.1, Spring Kafka 4.1.1 (latest GA), kafka-clients 4.2.1, JDK 25.0.4.1. Spring Kafka 4.2.0-M1 and M2 are milestones and were not tested. Date: 28 September 2026. Companion code: spring-messaging-demo/kafka4-migration.

Spring Batch 5 to 6 Migration Guide

Spring Batch 6 moves classes to new packages, changes what the Spring Boot starter gives you, and adds a second way to write a chunk step. Most of it fails loudly. One change does not: a listener that stops being called. This article migrates one small job from Batch 5 to Batch 6, one step at a time, and shows what each step prints. You should know what a batch job and step are. Everything else is explained on the way. If you are new to Batch itself, start with Spring Batch on Boot 4.1: jobs, steps, chunk processing and restartability. Versions tested. Before: Spring Boot 3.5.16 with Spring Batch 5.2.6 on JDK 21. After: Spring Boot 4.1.1 with Spring Batch 6.0.5, the latest GA, on JDK 25.0.4.1. Batch 6.1.0-M1 and 6.1.0-M2 exist as milestones and were not tested. Date: 28 September 2026. Companion code: spring-boot-demo/batch-5-to-6.

Gradle 9 for Spring Boot 4 Projects: Configuration Cache, Version Catalogs and Kotlin DSL

Gradle 9 removed several things that a typical Spring Boot 3 build script still uses, and it treats the configuration cache as the direction of travel. This article takes one small Spring Boot 4 project, written the way most Boot 3 projects were, runs it on Gradle 8 and Gradle 9, and fixes it step by step. Every error message below comes from a real run. You only need to have run ./gradlew build before. Terms such as configuration cache, version catalog and Kotlin DSL are explained where they first appear. Versions tested. Gradle 9.8.0 on JDK 25.0.4.1 and Gradle 8.14.3 on JDK 21, with Spring Boot 4.1.1, on 28 September 2026. Companion code: spring-boot-demo/gradle9.

What’s Coming in JDK 28: Value Classes Preview and Strict Field Initialization

JDK 28 will be released in March 2027, and its headline feature is one Java developers have waited a decade for: value classes, the first preview to come out of Project Valhalla. Early-access builds already exist, so instead of summarising a JEP page this article installs one and tries the features. You need to know what a Java record is and that == on two objects normally asks “is this the very same object?”. That question is exactly what value classes change. Status: early access, snapshot of 28 September 2026. Tested on OpenJDK 28-ea+17 (build of 24 September), compared with JDK 25.0.4.1. Everything here can change before general availability, and this article will be updated as JEP targets change. Nothing below is a recommendation to use preview features in production. Companion code: javademos/jdk28-preview.

Java 17 to Java 25 Migration Guide: The Direct Jump

Java 21 is the LTS most guides tell you to upgrade to. But plenty of teams are still on Java 17, and when they finally move, the sensible target is the next LTS, Java 25, skipping 21 entirely. That is a jump across eight releases, and the release notes for eight releases are not a reading list anyone wants. This article does something simpler. It takes small programs compiled once for Java 17, runs them unchanged on Java 17 and Java 25, and shows what differs — what now fails, what silently changes, what merely warns. Then it shows how to have the JDK’s own tools find the same problems in your code. You need to know how to run a Java program; nothing more. Versions and status. JDK 17.0.20.1 and JDK 25.0.4.1 (both Temurin), Maven 3.9, on a 2-CPU Linux machine. Java 25 is an LTS release. Spring Boot 4.1.1 for the framework rows. Everything below was run unless the text says it is a quotation from documentation. Companion code: javademos/migration-17-25.

Automating javax → jakarta and Boot 3 → 4 Upgrades with OpenRewrite

Every Spring team eventually faces the same afternoon: change javax. to jakarta. in four hundred files, rewrite the security configuration, rename a dozen properties, and then do it again for the next major version. It is dull, error-prone work, and it is exactly what a tool called OpenRewrite is for. OpenRewrite reads your source into a tree, applies recipes — small, named, repeatable edits — and writes the result back, formatting intact. You run it as a Maven plugin. This article runs it for real on a deliberately old application, shows every line it changed, and, more usefully, lists what it left for you. You need to know what Maven is and what a Spring Boot upgrade involves; nothing about OpenRewrite. Versions and status. rewrite-maven-plugin 6.46.1, rewrite-spring 6.37.1, rewrite-migrate-java 3.42.1. Legacy app: Spring Boot 2.7.18 on JDK 17.0.20, Maven 3.9. Recipes moved it to Boot 3.5.16 and then 4.0.8; I bumped the last step to 4.1.1 by hand. One legacy application with one test is a demonstration, not a survey — your codebase will find things this one does not. Companion code: spring-boot-demo/openrewrite.

Jakarta EE 11 for Spring Developers: What Actually Matters

If you write Spring for a living, “Jakarta EE 11” sounds like somebody else’s problem: application servers, EJBs, a different world. Yet every Spring Boot 4 application already runs on pieces of it — the servlet API under the web server, the persistence API under Hibernate, the validation API under @NotNull. When Jakarta EE 11 shipped, most of it arrived in your project without a headline. This article separates what actually changed in those pieces from what merely got a new number. It does that by reading the real API jars — EE 10 next to EE 11 — and Spring Boot’s own version list, rather than the marketing summary. You only need to know that Jakarta EE is a family of standard Java APIs and that Spring uses several of them. Versions and status. Spring Boot 4.1.1 (Spring Framework 7.0.9, Tomcat 11.0.24, Hibernate 7.4.5), JDK 25.0.4, Maven 3.9. Jakarta jars compared: Servlet 6.0.0→6.1.0, Persistence 3.1.0→3.2.0, Validation 3.0.0→3.1.0, Annotations 2.1.1→3.0.0, Concurrency 3.0.0→3.1.1, plus Data 1.0.2. Companion code: spring-boot-demo/jakarta-ee-11.

Hibernate 8 and Jakarta Persistence 4.0 Preview: What Will Break

A 205-test Hibernate suite run against Hibernate 8.0.0.Beta3 and Jakarta Persistence 4.0.0-M7: the classpath trap, the Spring blocker, removed APIs, a binary-compatibility break and the runtime changes that did and did not reproduce. Preview article, updated at GA.