Upgrade Java version from 17 to 21 LTS #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Upgrade Java version from 17 to 21 LTS
Summary
This PR upgrades the Spring Boot banking application from Java 17 to Java 21 LTS across all components:
java.versionproperty from 17 to 21 and fixed Maven compiler plugin configuration (was incorrectly set to Java 1.8, now properly set to 21). Also upgraded maven-compiler-plugin from 3.8.0 to 3.11.0 for Java 21 support.maven:3.8.3-openjdk-21) and runtime image (openjdk:21-alpine)openjdk-21-jreThe changes maintain compatibility with Spring Boot 3.3.3 (which supports Java 21) and MySQL connector 8.0.33.
Review & Testing Checklist for Human
mvn clean compileto ensure no compilation errorsdocker build .to verify both openjdk-21 images are available and build succeedsopenjdk-21-jrepackage is available for Jenkins installationNotes
mysql:mysql-connector-java→com.mysql:mysql-connector-j, but this is just packaging and doesn't affect Java 21 compatibilityLink to Devin run: https://app.devin.ai/sessions/dc04192d9ad643d0b1b6b44345264507
Requested by: @JRWu