Skip to content

Conversation

@devin-ai-integration
Copy link

Java 8 to Java 11 Migration

Summary

This PR migrates the Springboot-BankApp from Java 8 to Java 11. Since the codebase was using Spring Boot 3.3.3 (which requires Java 17+), this migration required downgrading to Spring Boot 2.7.18 LTS (which supports Java 8-17).

Key changes:

  • Spring Boot: 3.3.3 → 2.7.18
  • Java: 8 → 11 (via <release>11</release>)
  • JPA imports: jakarta.persistencejavax.persistence
  • Security: Spring Security 6 lambda DSL → Spring Security 5 method chaining
  • Thymeleaf: springsecurity6 → springsecurity5
  • Hibernate dialect: MySQL8Dialect → MySQL57Dialect
  • Added GitHub Actions CI workflow for JDK 11

Review & Testing Checklist for Human

  • Verify Spring Boot downgrade is acceptable - This is a significant version change from 3.3.3 to 2.7.18. Confirm this aligns with requirements.
  • Test authentication flows manually - SecurityConfig was rewritten for Spring Security 5. Test login, logout, and registration flows.
  • Verify MySQL compatibility - Changed to MySQL57Dialect. Test with actual MySQL 8.x database to ensure compatibility.
  • Review UserDetails hardcoded methods - isAccountNonExpired(), isAccountNonLocked(), isCredentialsNonExpired(), isEnabled() all return true. Verify this is acceptable for the application's security requirements.
  • End-to-end test with MySQL - The CI uses H2 for testing. Deploy locally with MySQL and test all banking operations (deposit, withdraw, transfer).

Recommended test plan:

  1. Start MySQL and create the bankappdb database
  2. Run mvn spring-boot:run and verify application starts
  3. Test user registration, login, deposit, withdrawal, and transfer operations
  4. Verify logout works correctly

Notes

  • See MIGRATION_NOTES.md for detailed documentation of all changes
  • Spring Boot 2.7.x reaches end of support in November 2024 - consider future upgrade to 3.x with Java 17+

Link to Devin run: https://app.devin.ai/sessions/987a3100a2c64f59aeca25e3997e3199
Requested by: Cindy Huang (cindy.huang@cognition.ai) (@cindyyhuang)

devin-ai-integration bot and others added 7 commits December 17, 2025 03:29
…lugins

- Downgrade Spring Boot from 3.3.3 to 2.7.18 (LTS) for Java 11 compatibility
- Update maven-compiler-plugin to 3.11.0 with <release>11</release>
- Upgrade maven-surefire-plugin to 3.2.5
- Upgrade maven-failsafe-plugin to 3.2.5
- Add maven-enforcer-plugin 3.5.0 to require Java 11+
- Change thymeleaf-extras-springsecurity6 to springsecurity5
- Add H2 database dependency for testing

Co-Authored-By: Cindy Huang <cindy.huang@cognition.ai>
- Change jakarta.persistence imports to javax.persistence in Account.java
- Change jakarta.persistence imports to javax.persistence in Transaction.java
- Add UserDetails interface methods to Account.java for Spring Security 5

Co-Authored-By: Cindy Huang <cindy.huang@cognition.ai>
- Change from Spring Security 6 lambda DSL to Spring Security 5 method chaining
- Replace requestMatchers() with antMatchers()
- Replace authorizeHttpRequests() with authorizeRequests()
- Update logout, formLogin, and headers configuration

Co-Authored-By: Cindy Huang <cindy.huang@cognition.ai>
- Change MySQL8Dialect to MySQL57Dialect for Hibernate 5 compatibility

Co-Authored-By: Cindy Huang <cindy.huang@cognition.ai>
- Add test-specific application.properties with H2 in-memory database
- Configure H2 dialect and create-drop DDL for test isolation

Co-Authored-By: Cindy Huang <cindy.huang@cognition.ai>
- Add GitHub Actions workflow for Java 11 builds
- Use Temurin JDK 11 distribution
- Include Maven caching for faster builds

Co-Authored-By: Cindy Huang <cindy.huang@cognition.ai>
- Add MIGRATION_NOTES.md summarizing Java 8 to 11 migration changes
- Update README.md with Java 11 requirement

Co-Authored-By: Cindy Huang <cindy.huang@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