Upgrade Log: Spring Boot 4 / Spring Batch 6, Starting from Composite PK
Key point
Introducing a Composite PK became the trigger for migrating to Spring Boot 4 and Spring Batch 6.
Details
While trying to move a settlement mapping table that needed a Composite PK to Spring Data JDBC's Composite ID, we ended up upgrading Spring Boot 4.0.1 and Spring Data JDBC 4.0.1 together as a result. The old workaround of marking only part of the PK as @Id was risky because it could overwrite a different row in save and deleteById, so we separated the intent of a new insert using an @Id val mappingId: SettlementMappingId form together with Persistable and markNew().
The scope of the upgrade kept expanding.
- Spring Boot 3.5.0 → 4.0.1
- Spring Framework 6.2.7 → 7.0.2
- Spring Batch 5.2.2 → 6.0.1
- Spring Data JDBC 3.5.0 → 4.0.1
- Kotlin 2.1 → 2.3
- Gradle 8.10 → 9.2.1
- ojdbc8 → ojdbc11
- kotest 5.9.1 → 6.0.7
To meet Spring Boot 4's requirements, we also replaced spring-boot-starter-aop with spring-boot-starter-aspectj. In the batch module, we had to check changes such as the Batch metadata storage method, the Job execution API, the JobParameters structure, and the listener/item package moves, and before applying this to production we needed to clean up JobExecution entries that had failed in v5, migrate the meta schema, and review the DB access policy.
In the end, this work wasn't just about changing version numbers—it was about realigning the entire stack so that production batch jobs would behave exactly the same after the upgrade as they did before.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.