Skip to content

build: migrate Java 17 to Java 21#256

Open
devin-ai-integration[bot] wants to merge 1 commit into
DevOpsfrom
devin/1782300706-java21-migration
Open

build: migrate Java 17 to Java 21#256
devin-ai-integration[bot] wants to merge 1 commit into
DevOpsfrom
devin/1782300706-java21-migration

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Jun 24, 2026

Copy link
Copy Markdown

Summary

Migrates the build and runtime from Java 17 to Java 21. Spring Boot spring-boot-starter-parent 3.3.3 already supports Java 21, so no Spring Boot bump is needed.

pom.xml

  • <java.version>17</java.version>21.
  • Removed the explicit maven-compiler-plugin block, which was incorrectly pinning <source>1.8</source>/<target>1.8</target>. The parent POM now manages the compiler plugin and drives --release 21 from the java.version property.

Dockerfile

  • Builder stage: maven:3.8.3-openjdk-17maven:3.9-eclipse-temurin-21.
  • Deployer stage: openjdk:17-alpineeclipse-temurin:21-jre-alpine (the openjdk Docker Hub repo is deprecated with no 21 tag).

Jenkinsfile and GitOps/Jenkinsfile build via Docker and don't pin a JDK tool, so they need no changes.

Verification

  • mvn clean install compiles with --release 21; emitted bytecode is major version 65 (Java 21).
  • docker build . succeeds with both new base images.

Link to Devin session: https://app.devin.ai/sessions/91d43ce48dbb41598d9ed0d3727df844


Devin Review

Status Commit
⚪ Not started

Run Devin Review

Open in Devin Review (Staging)

Co-Authored-By: aman.thind <aman.thind@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown
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, CI, and merge conflict monitoring

@devin-ai-integration

Copy link
Copy Markdown
Author

Runtime test — Java 21 migration ✅

Ran the app locally via mvn spring-boot:run under Java 21.0.11 against MySQL 8.0 and exercised the core banking flow end-to-end. All checks passed.

E2E flow (register → login → deposit → transactions)
Step Expected Result
Register devintest21 redirect to /login, no error ✅ passed
Login redirect to /dashboard, balance $0.00 ✅ passed
Deposit $100 balance becomes exactly $100.00 ✅ passed
Transactions row: Deposit 100.00 with timestamp ✅ passed
Dashboard after deposit Transaction history
balance $100 transactions
Build / runtime evidence
  • Boot log: Starting BankappApplication using Java 21.0.11
  • mvn clean install compiled with --release 21; bytecode major version 65 (Java 21)
  • docker build . succeeded with maven:3.9-eclipse-temurin-21 and eclipse-temurin:21-jre-alpine
  • CI: Snyk security + license checks passed

Devin session: https://app.devin.ai/sessions/91d43ce48dbb41598d9ed0d3727df844

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