Repository navigation
build(Application): upgrade Java version from 17 to 21 - #378
Open
hirokiterashima wants to merge 1 commit into
Open
hirokiterashima wants to merge 1 commit into
hirokiterashima wants to merge 1 commit into
Conversation
Remove unused .travis.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 from Java 17 to Java 21
Changes
pom.xml: setjava.versionto21(it was inherited as 17 from the Spring Boot parent)Dockerfile: build and runtime images useeclipse-temurin-21/eclipse-temurin:21Dockerfile.dev: useseclipse-temurin-21.github/workflows/ci.yml,release.yml: set up JDK 21scripts/beforeInstall.sh: installsopenjdk-21-jdk-headless. EC2 hosts must run Ubuntu 22.04 or newer.classpath,.settings/org.eclipse.jdt.core.prefs: Eclipse/STS settings set to Java 21The application code itself does not change.
How to verify
WISE-Docker-Dev/docker-compose.yml, change thewise-apiservice's image:up -dhere, notdocker compose restart.restartkeeps using the old image.docker compose exec wise-api java -versionshould show21. The logs (docker compose logs -f wise-api) should show no errors at startup.develop../mvnw clean verifyshould pass, the same as ondevelop.ci.ymlchecks pass on this PR.When you're done reviewing, change
image:back to the previous value and run step 2 again.If you build or run WISE-API outside Docker, you need JDK 21. If you see
release version 21 not supported(or other strange build errors), Maven or your IDE is still using JDK 17.mvn -vand/usr/libexec/java_home -Vbrew install --cask temurin@21export JAVA_HOME=$(/usr/libexec/java_home -v 21)If WISE-API container fails to start, you might be using application.properties that are intended for spring-boot-3.5 PR. This is only applicable for those who have reviewed the SpringBoot 3.5 PR. Check the stacktrace error message for clues and make sure that you have the right key names.
PR clean up