Skip to content

Migrate catalog-spring-boot from Spring Boot 2.1.6 to Spring Boot 3.2.5#8

Open
blues-man wants to merge 2 commits into
mainfrom
migration/spring-boot-3
Open

Migrate catalog-spring-boot from Spring Boot 2.1.6 to Spring Boot 3.2.5#8
blues-man wants to merge 2 commits into
mainfrom
migration/spring-boot-3

Conversation

@blues-man

Copy link
Copy Markdown
Contributor

Summary

This PR completes the full automated migration of catalog-spring-boot from Spring Boot 2.1.6 (Red Hat BOM) to Spring Boot 3.2.5 (community upstream), session mig-20260525-sb2to3.

  • Replaced Red Hat BOM with spring-boot-starter-parent:3.2.5 and removed vendor-specific repositories
  • Migrated javax.persistencejakarta.persistence for Jakarta EE 9+ compliance
  • Updated Spring Cloud Kubernetes to fabric8 variant with 2023.0.1 BOM
  • Updated all plugins and Java version to 17
  • Added actuator endpoint exposure and H2 2.x compatibility fixes
  • Refactored to constructor injection in CatalogController

Changes by File

File Rules Applied
pom.xml RULE-001, RULE-003, RULE-004, RULE-005, RULE-007, RULE-008
src/main/java/.../Product.java RULE-002
src/main/java/.../CatalogController.java RULE-010
src/main/resources/application.properties RULE-006, RULE-009

Artifacts added: analysis-report.json, migration-plan.json, rule.md, tasks.md

Verification Results

  • mvn clean package -DskipTests: BUILD SUCCESS (3.3s, Java 21 runtime)
  • GET /actuator/health: {"status":"UP"} - H2 database UP
  • GET /api/catalog: Returns all 9 products from import.sql
  • No ERROR messages in startup log

Linked Issues

Closes #3 (STORY-001: pom.xml update)
Closes #4 (STORY-002: javax→jakarta)
Closes #5 (STORY-003: application config)
Closes #6 (STORY-004: constructor injection)
Closes #7 (STORY-005: build verification)

Test plan

  • mvn clean package -DskipTests completes successfully
  • java -jar target/catalog-1.0-SNAPSHOT.jar --spring.cloud.kubernetes.enabled=false starts without errors
  • curl http://localhost:8080/actuator/health returns {"status":"UP"}
  • curl http://localhost:8080/api/catalog returns JSON array with 9 products
  • No javax.persistence references remain in source

Generated by migration session mig-20260525-sb2to3

Generated with Claude Code

blues-man and others added 2 commits May 25, 2026 13:06
Applies all migration rules from session mig-20260525-sb2to3:

RULE-001: Upgrade Java source/target from 11 to 17
RULE-002: Migrate javax.persistence to jakarta.persistence in Product.java
RULE-003: Replace Red Hat BOM (me.snowdrop:spring-boot-bom) with
          spring-boot-starter-parent:3.2.5 parent POM
RULE-004: Remove explicit spring-boot-maven-plugin version (inherited from parent)
RULE-005: Replace spring-cloud-starter-kubernetes-config with
          spring-cloud-starter-kubernetes-fabric8-config and Spring Cloud
          BOM 2023.0.1
RULE-006: Update H2 URL for H2 2.x compatibility (add DB_CLOSE_DELAY=-1)
RULE-007: Update maven-compiler-plugin from 3.6.1 to 3.11.0
RULE-008: Update kubernetes-maven-plugin from 1.1.1 to 1.16.2
RULE-009: Expose actuator endpoints (health, info, metrics) in application.properties
RULE-010: Refactor CatalogController from field injection to constructor injection

Verified: mvn clean package -DskipTests BUILD SUCCESS
Verified: /actuator/health returns UP with H2 database UP
Verified: /api/catalog returns all 9 products from import.sql

Closes #3, #4, #5, #6, #7

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All 5 stories completed. Pull request #8 created.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant