Skip to content

Upgrade to Spring Boot 3.3.13 and Spring Cloud 2023.0.6#15

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

Upgrade to Spring Boot 3.3.13 and Spring Cloud 2023.0.6#15
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1760740099-spring-boot-3-upgrade

Conversation

@devin-ai-integration

Copy link
Copy Markdown

Upgrade to Spring Boot 3.3.13 and Spring Cloud 2023.0.6

Summary

This PR upgrades all 7 microservices in the BankingMicroservices repository from Spring Boot 2.7.x to Spring Boot 3.3.13 and Spring Cloud 2021.0.8 to 2023.0.6. This is a major version upgrade that addresses all critical breaking changes required for Spring Boot 3.x compatibility.

Version Changes:

  • Spring Boot: 2.7.14/2.7.15 → 3.3.13
  • Spring Cloud: 2021.0.8 → 2023.0.6 (Leyton release train)
  • Keycloak Admin Client: 21.0.1 → 26.0.7

Breaking Changes Addressed:

  • ✅ Migrated all javax.persistencejakarta.persistence imports (6 entity classes)
  • ✅ Migrated javax.transactionjakarta.transaction in UserServiceImpl
  • ✅ Updated GlobalExceptionHandler method signatures for Spring Framework 6.x (HttpStatusHttpStatusCode) in User-Service, Account-Service, and Fund-Transfer
  • ✅ Updated Spring Security configuration for Spring Security 6.x lambda-based DSL in API-Gateway
  • ✅ Removed deprecated @EnableEurekaClient annotations from API-Gateway, User-Service, and Transaction-Service (Spring Cloud 2022.x+ auto-enables discovery clients)
  • ✅ Added explicit commons-io 2.11.0 dependency to 4 services (no longer transitively provided in Spring Boot 3.x)

Compilation & Testing Status:

  • ✅ All 7 services compile successfully
  • ✅ All tests pass for Service-Registry, Sequence-Generator, and API-Gateway
  • ⚠️ 4 services (User-Service, Account-Service, Fund-Transfer, Transaction-Service) require MySQL and Keycloak for full testing

Review & Testing Checklist for Human

Critical items to verify (5):

  • End-to-End Integration Testing: Start all 7 services with MySQL and Keycloak running. Verify they can register with Service Registry, communicate via Feign clients, and handle database operations correctly. The jakarta.persistence migration and Hibernate 6.x (bundled with Spring Boot 3.x) might have subtle behavior changes.

  • OAuth2 Authentication Flow: Test the API Gateway's OAuth2 configuration thoroughly. I migrated from the old .and() chaining to Spring Security 6.x lambda-based DSL using Customizer.withDefaults(). Verify that login flows, JWT validation, and the /api/users/register public endpoint work correctly.

  • Keycloak Admin Client Integration: Test User-Service's Keycloak integration. The keycloak-admin-client was upgraded from 21.0.1 to 26.0.7 (5 major versions). Verify user registration, authentication, and any other Keycloak operations work as expected.

  • Database Operations: Verify all JPA operations (CRUD, transactions, relationships) work correctly with the jakarta.persistence namespace. Test entity persistence, querying, and any custom JPA configurations.

  • Feign Client Error Handling: Verify that FeignClientErrorDecoder classes in all 4 services handle errors correctly. I added explicit commons-io dependency for IOUtils.toString() which was previously transitive.

Test Plan Recommendation

  1. Start Service-Registry first
  2. Start Sequence-Generator and verify registration
  3. Start MySQL and Keycloak containers
  4. Start User-Service, Account-Service, Fund-Transfer, Transaction-Service and verify they can connect to MySQL/Keycloak
  5. Start API-Gateway and test OAuth2 flows
  6. Run end-to-end tests covering user registration, account creation, transactions, and fund transfers
  7. Monitor logs for any deprecation warnings or unexpected errors

Notes

  • This upgrade addresses Spring Boot 2.7.x end-of-life (November 2023)
  • The codebase already uses Java 17, which meets Spring Boot 3.x requirements
  • Spring Cloud 2023.0.6 (Leyton) is the latest stable release compatible with Spring Boot 3.3.x
  • CI pipeline may need updates if it has Spring Boot 2.x specific configurations

Session Info:

Major version upgrade from Spring Boot 2.7.x to 3.3.13 across all 7 microservices:

Version Updates:
- Spring Boot: 2.7.14/2.7.15 → 3.3.13
- Spring Cloud: 2021.0.8 → 2023.0.6
- Keycloak admin client: 21.0.1 → 26.0.7

Breaking Changes Addressed:
- Migrated javax.persistence to jakarta.persistence in all entity classes (6 files)
- Migrated javax.transaction to jakarta.transaction in UserServiceImpl
- Updated GlobalExceptionHandler method signatures for Spring Framework 6.x (HttpStatus → HttpStatusCode) in User-Service, Account-Service, and Fund-Transfer
- Updated Spring Security configuration for Spring Security 6.x (lambda-based DSL) in API-Gateway
- Removed deprecated @EnableEurekaClient annotations from API-Gateway, User-Service, and Transaction-Service

Dependency Changes:
- Added explicit commons-io 2.11.0 dependency to Account-Service, Fund-Transfer, Transaction-Service, and User-Service (previously transitive in Spring Boot 2.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