Skip to content

Conversation

@devin-ai-integration
Copy link

Upgrade Spring Boot Banking Application from Java 17 to Java 22

Summary

This PR upgrades the Spring Boot banking application from Java 17 to Java 22, updating all related dependencies, Docker images, and documentation. The upgrade includes:

Core Changes:

  • Java version: 17 → 22 in pom.xml properties
  • Spring Boot: 3.3.3 → 3.5.7 (supports Java 22)
  • Maven compiler plugin: 3.8.0 → 3.11.0 with source/target updated from 1.8 → 22
  • MySQL connector: Migrated from deprecated mysql:mysql-connector-java to com.mysql:mysql-connector-j

Docker Images:

  • Build stage: maven:3.8.3-openjdk-17maven:3.9.9-openjdk-22
  • Runtime stage: openjdk:17-alpineeclipse-temurin:22-alpine

Documentation:

  • Updated Jenkins JRE installation instructions in both README.md and README-K8S.md from openjdk-17-jre to openjdk-22-jre

Review & Testing Checklist for Human

⚠️ Important: Local build testing failed due to Java 22 not being available in the development environment. CI validation is critical for this PR.

  • CI Build Verification - Ensure all CI checks pass, particularly the Maven build with Java 22
  • Docker Image Build - Verify the Docker image builds successfully with the new base images (maven:3.9.9-openjdk-22 and eclipse-temurin:22-alpine)
  • Application Runtime Testing - Deploy and verify the application starts correctly with Java 22
  • Database Connectivity - Test MySQL connection with the new mysql-connector-j driver to ensure no connection issues
  • Spring Boot Compatibility - Review Spring Boot 3.5.7 release notes for any breaking changes that might affect this application

Test Plan

  1. Wait for CI to complete and verify all checks pass
  2. Build Docker image: docker build -t bankapp-test .
  3. Run application with Docker Compose: docker-compose up
  4. Verify application is accessible and database connections work
  5. Run any existing integration tests

Notes

  • The maven-compiler-plugin was previously misconfigured to target Java 1.8 while the project property claimed Java 17. This has been corrected - both now target Java 22.
  • The MySQL connector migration is necessary as mysql:mysql-connector-java is deprecated. The new com.mysql:mysql-connector-j is the recommended replacement and version is now managed by Spring Boot parent.
  • Eclipse Temurin is the recommended replacement for the unmaintained OpenJDK Alpine images.

Link to Devin run: https://app.devin.ai/sessions/73073e44825d4f30819c4f7647dbcceb
Requested by: @satwik-cog

- Update Java version property from 17 to 22 in pom.xml
- Upgrade Spring Boot parent version from 3.3.3 to 3.5.7 (supports Java 22)
- Update maven-compiler-plugin version from 3.8.0 to 3.11.0
- Update maven-compiler-plugin source/target from 1.8 to 22
- Migrate MySQL connector from mysql:mysql-connector-java to com.mysql:mysql-connector-j
- Update Docker build image from maven:3.8.3-openjdk-17 to maven:3.9.9-openjdk-22
- Update Docker runtime image from openjdk:17-alpine to eclipse-temurin:22-alpine
- Update Jenkins JRE installation instructions to openjdk-22-jre in README.md
- Update Jenkins JRE installation instructions to openjdk-22-jre in README-K8S.md

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