Skip to content

Conversation

@devin-ai-integration
Copy link

Upgrade Spring Boot from 2.1.4.RELEASE to 2.7.18

Summary

This PR upgrades the banking application from Spring Boot 2.1.4 to 2.7.18 following an incremental upgrade path (2.1.4 → 2.6.15 → 2.7.18). The upgrade includes necessary compatibility fixes for Springfox Swagger integration and JUnit test migration.

Key Changes:

  • Spring Boot version: 2.1.4.RELEASE → 2.7.18 (final 2.x release)
  • JUnit migration: JUnit 4 → JUnit 5 (required for Spring Boot 2.4+)
  • Springfox compatibility: Added custom WebMvcEndpointHandlerMapping bean and ant_path_matcher strategy to resolve compatibility issues with Springfox 2.9.2 and Spring Boot 2.6+
  • Dependency alignment: All Spring dependencies automatically upgraded (Spring Framework 5.3.31, Spring Security 5.7.11, Hibernate 5.6.15.Final, H2 2.1.214)

Review & Testing Checklist for Human

Risk Level: 🟡 Medium - Major version upgrade with compatibility workarounds

  • End-to-end functionality test: Start the application (mvn spring-boot:run) and verify core banking operations work correctly at http://localhost:8989/bank-api
  • Swagger UI verification: Confirm Swagger documentation is accessible and functional at http://localhost:8989/bank-api/swagger-ui.html (this required a complex compatibility fix)
  • Security testing: Verify authentication/authorization still works correctly (SecurityConfig uses deprecated WebSecurityConfigurerAdapter but should still function)
  • Database operations: Test H2 database functionality via H2 console at http://localhost:8989/bank-api/h2-console/ (H2 upgraded from 1.x to 2.1.214 with breaking changes)
  • Actuator endpoints: Verify Spring Boot Actuator endpoints are accessible at http://localhost:8989/bank-api/actuator/ (custom endpoint mapping bean could affect this)

Notes

  • The custom WebMvcEndpointHandlerMapping bean in ApplicationConfig.java is a workaround for Springfox 2.9.2 incompatibility with Spring Boot 2.6+ PathPattern matching. This is a complex fix involving Spring Boot internals.
  • WebSecurityConfigurerAdapter deprecation warnings are expected and will need to be addressed in future Spring Boot 3.x upgrade.
  • All tests pass, but the application only has basic integration test coverage.

Session Info: Requested by Ian Moritz (@iancmoritz)
Link to Devin run: https://app.devin.ai/sessions/ce525d1c329a4ac699f76746b42ea787

devin-ai-integration bot and others added 6 commits September 30, 2025 14:28
Co-Authored-By: Ian Moritz <ian.moritz@cognition.ai>
Co-Authored-By: Ian Moritz <ian.moritz@cognition.ai>
- Updated Spring Boot parent version to 2.4.13
- Migrated test from JUnit 4 to JUnit 5 (Jupiter)
- Removed @RunWith annotation (not needed in JUnit 5)
- Updated test imports to use org.junit.jupiter.api.Test
- All tests passing successfully

Co-Authored-By: Ian Moritz <ian.moritz@cognition.ai>
- Updated Spring Boot parent version to 2.5.15
- All Spring dependencies properly aligned (Spring Framework 5.3.27, Spring Security 5.5.8)
- Verified no breaking changes affect this application
- All tests passing successfully

Co-Authored-By: Ian Moritz <ian.moritz@cognition.ai>
Co-Authored-By: Ian Moritz <ian.moritz@cognition.ai>
Co-Authored-By: Ian Moritz <ian.moritz@cognition.ai>
@devin-ai-integration
Copy link
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.

1 participant