Skip to content

Conversation

@devin-ai-integration
Copy link

@devin-ai-integration devin-ai-integration bot commented Oct 2, 2025

Migrate Spring Boot Banking Application from Java 8 to Java 17

Summary

This PR migrates the banking application from Java 8/Spring Boot 2.1.4 to Java 17/Spring Boot 3.3.13. This is a major framework migration that includes:

  • Java version: 1.8 → 17
  • Spring Boot: 2.1.4.RELEASE → 3.3.13
  • JPA namespace: javax.persistencejakarta.persistence (7 model files)
  • API docs: Springfox Swagger → springdoc-openapi 2.6.0
  • Security: Deprecated WebSecurityConfigurerAdapter → modern SecurityFilterChain
  • Testing: JUnit 4 → JUnit 5
  • H2 Database: Updated to 2.2.224 for Java 17 compatibility

Review & Testing Checklist for Human

This is a high-risk change due to major framework upgrades. Please verify:

  • 🔴 CRITICAL: Security configuration - The SecurityConfig now uses .anyRequest().permitAll() which allows all requests without authentication. Verify this is the intended behavior vs the original more restrictive configuration.
  • API functionality - Test all REST endpoints through the new Swagger UI at /swagger-ui.html to ensure the springdoc-openapi migration didn't break anything
  • H2 Console access - Verify the H2 console at /h2-console/ still works and can connect to the database
  • Database operations - Create/read/update/delete operations for customers and accounts to ensure JPA with jakarta.persistence works correctly
  • Build and startup - Verify the application builds (mvn clean install) and starts without errors on Java 17

Recommended Test Plan

  1. Start the application and verify it runs on port 8989 with context /bank-api
  2. Access Swagger UI and test each endpoint:
    • POST /customers/add - Create a customer
    • GET /customers/{customerNumber} - Retrieve customer
    • POST /accounts/add/{customerNumber} - Create account
    • PUT /accounts/transfer/{customerNumber} - Test fund transfer
  3. Access H2 console and verify database connectivity
  4. Run the test suite: mvn test

Notes

  • Screenshots of working Swagger UI and H2 console are included in the PR
  • The application was successfully tested locally with all endpoints functional
  • No CI is configured for this repository, so manual testing is essential

Link to Devin run: https://app.devin.ai/sessions/c1686ec2b40c43648267958d279c58b6
Requested by: @ankehao-dev

- Update Spring Boot parent to 3.3.13
- Upgrade Java version from 1.8 to 17
- Migrate javax.persistence to jakarta.persistence in all JPA entities
- Replace Springfox Swagger with springdoc-openapi 2.6.0
- Modernize SecurityConfig to use SecurityFilterChain pattern
- Update JUnit 4 to JUnit 5 in tests
- Update H2 database to version 2.2.224 for Java 17 compatibility
- Remove deprecated WebSecurityConfigurerAdapter usage
- Remove Swagger annotations from controllers (auto-discovered by springdoc)
- Update documentation to reflect Java 17 requirement

Co-Authored-By: Anke Hao <[email protected]>
@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 2, 2025 01:15
- Change .anyRequest().authenticated() to .anyRequest().permitAll()
- This restores the original permissive security behavior
- Fixes ERR_HTTP_RESPONSE_CODE_FAILURE on all endpoints
- Enables access to Swagger UI, API endpoints, and H2 console

Co-Authored-By: Anke Hao <[email protected]>
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