Skip to content

Upgrade to Spring Boot 3.5.6 and Spring Cloud 2025.0.0#13

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1760133743-spring-boot-3-upgrade
Open

Upgrade to Spring Boot 3.5.6 and Spring Cloud 2025.0.0#13
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1760133743-spring-boot-3-upgrade

Conversation

@devin-ai-integration

Copy link
Copy Markdown

Upgrade to Spring Boot 3.5.6 and Spring Cloud 2025.0.0

Summary

This PR upgrades all 7 microservices from Spring Boot 2.7.x to Spring Boot 3.5.6 (latest stable) and Spring Cloud from 2021.0.8 to 2025.0.0 (Northfields release). This is a major framework upgrade requiring namespace migration, dependency updates, and code changes for API compatibility.

Changes Applied

Version Upgrades (all 7 services):

  • Spring Boot: 2.7.14/2.7.15 → 3.5.6
  • Spring Cloud: 2021.0.8 → 2025.0.0
  • Keycloak Admin Client (User-Service): 21.0.1 → 26.0.7

Namespace Migration (javax → jakarta):

  • Migrated all JPA entity classes from javax.persistence to jakarta.persistence (6 files)
  • Migrated transaction annotation from javax.transaction to jakarta.transaction (1 file)

Code Changes for Spring Boot 3.x Compatibility:

  • Removed deprecated @EnableEurekaClient annotations (API-Gateway, User-Service, Transaction-Service) - Spring Boot 3.x auto-registers with Eureka
  • Updated GlobalExceptionHandler method signatures (Account-Service, User-Service) - changed HttpStatus parameter to HttpStatusCode per Spring Framework 6.x API changes
  • Added explicit commons-io dependency (Account-Service, Fund-Transfer, Transaction-Service) - no longer included transitively in Spring Boot 3.x

Verification Completed

✅ All 7 services compile successfully
✅ Tests pass for Service-Registry, Sequence-Generator, and API-Gateway
✅ No remaining javax.persistence imports in codebase

Review & Testing Checklist for Human

⚠️ This is a HIGH-RISK PR due to major version upgrades and limited testing coverage. Thorough end-to-end testing is required before merging.

  • Deploy all services in complete environment - Set up MySQL, Keycloak, and all 7 services in a test environment. Verify all services start successfully and register with Eureka.

  • Test User-Service Keycloak integration - The Keycloak Admin Client was upgraded 5 major versions (21.0.1 → 26.0.7). Verify user creation, updates, and authentication flows still work correctly.

  • Test Account-Service, Fund-Transfer, and Transaction-Service - These services could not be tested locally due to MySQL/Keycloak dependencies. Verify all CRUD operations, Feign client calls, and error handling work correctly.

  • Test API-Gateway OAuth2 flows - Verify authentication, authorization, and routing work correctly. Note: Test output shows deprecation warnings for Gateway configuration properties (spring.cloud.gateway.routesspring.cloud.gateway.server.webflux.routes), but functionality should still work.

  • Test inter-service communication - Verify services can discover and communicate with each other through the API Gateway and via direct Feign client calls.

Recommended Test Plan

  1. Start all services: Service-Registry → Sequence-Generator → API-Gateway → User/Account/Fund-Transfer/Transaction services
  2. Create test user via User-Service
  3. Create test account via Account-Service
  4. Perform fund transfer via Fund-Transfer service
  5. Verify transactions are recorded in Transaction-Service
  6. Test all API Gateway routes and OAuth2 protected endpoints
  7. Check Eureka dashboard to verify all services are registered

Notes

  • Known deprecation: API-Gateway configuration properties have been renamed in Spring Cloud 2025.0.0. Current properties still work but will need updating in the future. See test output for details.
  • Missing dependencies: I had to explicitly add commons-io to 3 services because it's no longer a transitive dependency in Spring Boot 3.x. Monitor for other missing transitive dependencies during testing.
  • Testing limitation: 4 out of 7 services could not be fully tested locally due to missing MySQL and Keycloak infrastructure. Compilation and basic Spring context loading were verified via unit tests only.

Link to Devin run: https://app.devin.ai/sessions/a3d47422eceb40258738c6131c1e4004
Requested by: Sam Fertig (@samfert-codeium)

- Upgraded all 7 microservices from Spring Boot 2.7.14/2.7.15 to 3.5.6
- Upgraded Spring Cloud from 2021.0.8 to 2025.0.0 (Northfields)
- Upgraded Keycloak Admin Client from 21.0.1 to 26.0.7 for Jakarta EE support
- Migrated all javax.persistence imports to jakarta.persistence across 6 entity files
- Migrated javax.transaction import to jakarta.transaction in UserServiceImpl
- Removed deprecated @EnableEurekaClient annotations (auto-registration in Spring Boot 3.x)
- Updated ResponseEntityExceptionHandler method signatures (HttpStatus → HttpStatusCode)
- Added commons-io dependency to Account-Service, Fund-Transfer, and Transaction-Service
  (transitive dependency no longer included in Spring Boot 3.x)

All services compile successfully and tests pass for Service-Registry, Sequence-Generator, and API-Gateway.

Co-Authored-By: Sam Fertig <sam.fertig@codeium.com>
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants