Skip to content

Upgrade to Java 21: Dockerfile, Spring Boot 3.4.3, and Maven#96

Open
devin-ai-integration[bot] wants to merge 2 commits intoDevOpsfrom
devin/1770737766-dockerfile-java21
Open

Upgrade to Java 21: Dockerfile, Spring Boot 3.4.3, and Maven#96
devin-ai-integration[bot] wants to merge 2 commits intoDevOpsfrom
devin/1770737766-dockerfile-java21

Conversation

@devin-ai-integration
Copy link

@devin-ai-integration devin-ai-integration bot commented Feb 10, 2026

Upgrade to Java 21: Dockerfile, Spring Boot 3.4.3, and Maven

Summary

Adds a new Dockerfile.java21 and upgrades pom.xml to fully target Java 21. The original Dockerfile remains unchanged for Java 17 fallback.

Dockerfile.java21 (new file):

  • Build stage: maven:3.8.3-openjdk-17maven:3.9-eclipse-temurin-21
  • Runtime stage: openjdk:17-alpineeclipse-temurin:21-jre-alpine (openjdk images are deprecated past JDK 17)
  • Removed deprecated MAINTAINER directive

pom.xml updates:

  • Spring Boot 3.3.33.4.3
  • <java.version> 1721
  • maven-compiler-plugin 3.8.03.13.0 with <source>/<target> changed from 1.8 to 21
  • MySQL connector migrated from mysql:mysql-connector-java:8.0.33com.mysql:mysql-connector-j (version now managed by Spring Boot BOM)

Review & Testing Checklist for Human

  • Run mvn clean install: Neither the Maven build nor Docker build was tested. Verify all dependencies resolve and the project compiles successfully against Java 21.
  • Build and run the Docker image: Run docker build -f Dockerfile.java21 -t bankapp:java21 . and verify the app starts and connects to MySQL.
  • Verify Spring Boot 3.3.3 → 3.4.3 compatibility: Review the Spring Boot 3.4 release notes for any breaking changes affecting this app (Security, JPA, Thymeleaf).
  • Confirm mysql-connector-j BOM version: The explicit version pin was removed in favor of Spring Boot's dependency management. Verify the resolved version is compatible with your MySQL server.
  • Verify Docker image tags exist on Docker Hub: Confirm maven:3.9-eclipse-temurin-21 and eclipse-temurin:21-jre-alpine are valid published tags.

Suggested test plan: Build with Maven → build Docker image → run with docker-compose (updating image reference to use -f Dockerfile.java21) → verify login, registration, deposit, withdrawal, and transfer flows against MySQL.

Notes

  • The existing Dockerfile for Java 17 is untouched.
  • Downstream references (Jenkinsfile, docker-compose.yml, K8s manifests) still point at the original Dockerfile; those would need updating separately if this becomes the primary build.
  • No application source code was changed — the Java code is already compatible with modern Spring Boot 3.x / Jakarta EE APIs.

Requested by: @matthewguerra-cog
Link to Devin run

Co-Authored-By: Matthew Guerra <matthew.guerra@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

…and mysql-connector-j

Co-Authored-By: Matthew Guerra <matthew.guerra@cognition.ai>
@devin-ai-integration devin-ai-integration bot changed the title Add alternative Dockerfile for Java 21 Upgrade to Java 21: Dockerfile, Spring Boot 3.4.3, and Maven Feb 10, 2026
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.

0 participants