Skip to content

Conversation

@devin-ai-integration
Copy link

Upgrade Java from 17 to 21

Summary

Upgrades the Spring Boot banking application from Java 17 to Java 21 across all configuration files and infrastructure components. This includes updates to Maven configuration, Docker images, and documentation to ensure consistency throughout the deployment pipeline.

Changes made:

  • pom.xml: Updated Java version property from 17 to 21 and Maven compiler plugin source/target from 1.8 to 21
  • Dockerfile: Updated both builder stage (maven:3.8.3-openjdk-17maven:3.8.3-openjdk-21) and runtime stage (openjdk:17-alpineopenjdk:21-alpine)
  • README.md: Updated Jenkins installation documentation to use openjdk-21-jre instead of openjdk-17-jre

Spring Boot 3.3.3 already supports Java 21, so no framework version changes were required.

Review & Testing Checklist for Human

🟡 Medium Risk - 4 critical items to verify:

  • Build and test application locally - Run mvn clean install and mvn spring-boot:run to verify compilation and startup with Java 21
  • Docker build verification - Build the Docker image end-to-end: docker build -t bankapp-java21-test . and test container startup
  • CI/CD pipeline compatibility - Run the full Jenkins pipeline including SonarQube analysis, Trivy scanning, and OWASP dependency checks to ensure all tools work with Java 21
  • End-to-end application testing - Deploy to a test environment and verify core banking functionality (user registration, login, transactions) works correctly

Notes

  • All Java 21 Docker base images should be verified to exist and be stable
  • Pay special attention to the mysql-connector-java 8.0.33 dependency - may need updating for optimal Java 21 compatibility
  • Consider running performance tests to identify any Java 21-specific performance characteristics

Link to Devin run: https://app.devin.ai/sessions/595db5c7fd5f4c3bb9342ee7c20c6d54
Requested by: Jia Wu (jia.wu@cognition.ai)

- Update pom.xml: Java version property from 17 to 21
- Update pom.xml: Maven compiler source/target from 1.8 to 21
- Update Dockerfile: Builder image from maven:3.8.3-openjdk-17 to maven:3.8.3-openjdk-21
- Update Dockerfile: Runtime image from openjdk:17-alpine to openjdk:21-alpine
- Update README.md: Jenkins installation docs from openjdk-17-jre to openjdk-21-jre

Spring Boot 3.3.3 already supports Java 21, so no Spring Boot version changes needed.

Co-Authored-By: Jia Wu <jia.wu@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