Skip to content

Conversation

@devin-ai-integration
Copy link

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

MBA-306: Upgrade Java from 17 to 21

Summary

This PR upgrades the Spring Boot banking application from Java 17 to Java 21 to address JIRA ticket MBA-306. The changes include updating Maven configuration, fixing a critical Maven compiler plugin inconsistency, and updating Docker images.

Key Changes:

  • Updated java.version property from 17 to 21 in pom.xml
  • Fixed Maven compiler plugin configuration: updated source/target from 1.8 to 21 (addresses critical inconsistency)
  • Upgraded Maven compiler plugin from 3.8.0 to 3.11.0 for Java 21 support
  • Updated Docker builder image to maven:3.9.11-eclipse-temurin-21-alpine
  • Updated Docker runtime image to eclipse-temurin:21-jdk-alpine

Important Note: The original specification requested maven:3.9.6-openjdk-21 and openjdk:21-alpine Docker images, but these don't exist on Docker Hub (OpenJDK Docker images have been deprecated). I switched to Eclipse Temurin images, which are the official replacement for OpenJDK Docker images.

Review & Testing Checklist for Human

  • Build and run the application locally with Java 21 - Verify it starts up successfully and functions correctly
  • Test Docker build and container execution - Ensure the new Eclipse Temurin images work properly and the application runs in containers
  • Validate Spring Boot 3.3.3 compatibility with Java 21 - Confirm all Spring features work as expected with the new Java version
  • Approve Docker image choice - Confirm Eclipse Temurin is acceptable instead of the originally specified OpenJDK images

Notes

  • Compilation was verified via successful Docker build (local environment has Java 17, not 21)
  • No CI is configured on this repository, so automated testing wasn't available
  • The Maven compiler plugin upgrade to 3.11.0 was necessary for full Java 21 support

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

- Update java.version property from 17 to 21 in pom.xml
- Fix Maven compiler plugin configuration: update source and target from 1.8 to 21
- Upgrade Maven compiler plugin from 3.8.0 to 3.11.0 for Java 21 support
- Update Docker builder image to maven:3.9.6-openjdk-21
- Update Docker runtime image to openjdk:21-alpine

This addresses the critical Maven compiler plugin inconsistency where the
project declared Java 17 but the compiler plugin was still targeting Java 1.8.

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

- Change maven:3.9.6-openjdk-21 to maven:3.9.11-eclipse-temurin-21-alpine
- Change openjdk:21-alpine to eclipse-temurin:21-jdk-alpine

The original OpenJDK Docker images have been deprecated and are no longer
available on Docker Hub. Eclipse Temurin is the official replacement for
OpenJDK Docker images. Verified successful build with Java 21 via Docker.

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