Skip to content

Conversation

@devin-ai-integration
Copy link

Upgrade Java version from 17 to 22 with all dependencies

Summary

This PR upgrades the Spring Boot BankApp from Java 17 to Java 22, updating all related dependencies and Docker base images as requested. This is a significant upgrade spanning multiple Java LTS versions (17 → 21 → 22).

Changes made:

  • Updated java.version property from 17 to 22 in pom.xml
  • Upgraded Maven Compiler Plugin from 3.8.0 to 3.13.0 (required for Java 22 support)
  • Updated Maven compiler source/target from 1.8 to 22
  • Migrated MySQL connector from deprecated mysql:mysql-connector-java:8.0.33 to com.mysql:mysql-connector-j:9.0.0
  • Updated Dockerfile builder stage: maven:3.8.3-openjdk-17maven:3.9-openjdk-22
  • Updated Dockerfile runtime stage: openjdk:17-alpineeclipse-temurin:22-alpine
  • Updated Jenkins installation docs from openjdk-17-jre to openjdk-22-jre

Review & Testing Checklist for Human

⚠️ HIGH RISK PR - This PR involves major version upgrades and was not tested locally due to dev environment having Java 17 instead of Java 22.

  • Verify CI builds pass - Confirm all Maven compilation and tests succeed with Java 22
  • Test Docker build - Build the Docker image locally and verify both builder and runtime stages work with new base images
  • Test application startup - Deploy and verify the application starts successfully and connects to MySQL database
  • Verify MySQL connector compatibility - The connector was upgraded from 8.0.33 to 9.0.0 (major version), test database operations work correctly
  • End-to-end functional testing - Test core banking functionality to catch any Java 22 compatibility issues or breaking changes from dependency upgrades

Recommended Test Plan

  1. Build Docker image: docker build -t bankapp:java22-test .
  2. Run with docker-compose: docker-compose up
  3. Access application at http://localhost:8080
  4. Test login, account operations, transactions
  5. Check application logs for any warnings or errors related to Java 22 or MySQL connector

Notes

  • Spring Boot 3.3.3 should support Java 22, but this hasn't been explicitly verified in this PR
  • The MySQL connector migration from mysql:mysql-connector-java to com.mysql:mysql-connector-j is necessary as the old artifact was deprecated
  • Eclipse Temurin is the recommended OpenJDK distribution and should be compatible with the previous openjdk:alpine images

Link to Devin run: https://app.devin.ai/sessions/1b1ad57bba1d4056a366cc682226a19c
Requested by: Satwik Bebortha (@satwik-cog)

- Update Java version property from 17 to 22 in pom.xml
- Update Maven Compiler Plugin from version 3.8.0 to 3.13.0 for Java 22 support
- Update Maven Compiler Plugin source/target from 1.8 to 22
- Update MySQL connector from mysql:mysql-connector-java:8.0.33 to com.mysql:mysql-connector-j:9.0.0
- Update Dockerfile builder stage from maven:3.8.3-openjdk-17 to maven:3.9-openjdk-22
- Update Dockerfile runtime stage from openjdk:17-alpine to eclipse-temurin:22-alpine
- Update Jenkins installation instructions from openjdk-17-jre to openjdk-22-jre

Co-Authored-By: Satwik Bebortha <satwik.bebortha@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