Skip to content

Conversation

@devin-ai-integration
Copy link

Migrate from Java 8 to Java 11 with Spring Boot 2.7.18

Summary

This PR completes the migration from Java 8 to Java 11 as requested. The changes include:

  • Java version: Updated from 1.8 to 11 in pom.xml
  • Spring Boot upgrade: 2.1.4.RELEASE → 2.7.18 (required for Java 11 compatibility)
  • Springfox upgrade: 2.9.2 → 3.0.0 with compatibility workarounds for Spring Boot 2.6+
  • Test framework: Migrated from JUnit 4 to JUnit 5
  • Configuration changes: Added path matching strategy and BeanPostProcessor for Springfox compatibility

Key Technical Changes

  1. pom.xml: Updated Java version property and Spring Boot parent version; consolidated Springfox dependencies into single springfox-boot-starter
  2. ApplicationConfig.java: Added BeanPostProcessor that filters out PathPatternParser-based handler mappings (Springfox 3.0.0 compatibility workaround)
  3. application.yml: Added spring.mvc.pathmatch.matching-strategy: ant_path_matcher configuration
  4. BankingApplicationTests.java: Migrated to JUnit 5 annotations

Review & Testing Checklist for Human

⚠️ IMPORTANT: The basic test suite passes, but this is a significant framework upgrade. Please perform thorough manual testing:

  • Run the application locally and verify it starts without errors on Java 11
  • Test Swagger UI: Access http://localhost:8989/bank-api/swagger-ui.html and verify API documentation loads correctly (Springfox was completely upgraded)
  • Test core banking operations: Create customers, create accounts, perform deposits/withdrawals/transfers using the REST API
  • Verify H2 console: Access http://localhost:8989/bank-api/h2-console/ and verify database connectivity
  • Check for deprecation warnings: Review the application startup logs and build output for any deprecation warnings that might indicate future compatibility issues

Notes

  • The BeanPostProcessor in ApplicationConfig.java uses reflection as a workaround for Springfox 3.0.0 compatibility with Spring Boot 2.6+. This is a known pattern but is somewhat fragile.
  • The Spring Boot upgrade (2.1.4 → 2.7.18) is a 6 minor version jump. While the context loads successfully, there may be subtle behavioral changes in Spring Security, JPA, or other components.
  • Compiled using Java 17 with target Java 11. Should be tested in actual Java 11 runtime environment if possible.

Link to Devin run: https://app.devin.ai/sessions/7b3d02e01c2d4fb89e636fdb4ae612f7
Requested by: @jaime-leo (Jaime Mizrachi)

- Updated java.version from 1.8 to 11 in pom.xml
- Upgraded Spring Boot parent from 2.1.4.RELEASE to 2.7.18
- Upgraded Springfox from 2.9.2 to 3.0.0 (springfox-boot-starter) for Spring Boot 2.6+ compatibility
- Updated test dependencies from JUnit 4 to JUnit 5
- Added BeanPostProcessor workaround for Springfox 3.0.0 compatibility with Spring Boot 2.6+
- Added path matching strategy configuration in application.yml for Springfox compatibility

All tests passing with the new configuration.

Co-Authored-By: Jaime Mizrachi <jaime@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

@devin-ai-integration devin-ai-integration bot changed the base branch from dependabot/maven/io.springfox-springfox-swagger-ui-2.10.0 to master October 16, 2025 15:23
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