-
Notifications
You must be signed in to change notification settings - Fork 1
feature: upgrade to Java 21 and Spring Boot 3.5.16 (Maven + Gradle) #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| /.idea/ | ||
| /.idea/ | ||
| /target/ | ||
| /build/ | ||
| /.gradle/ |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,32 +1,35 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||
| buildscript { | ||||||||||||||||||||||||||||||||||||||||||||||||
| repositories { | ||||||||||||||||||||||||||||||||||||||||||||||||
| mavenCentral() | ||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
| dependencies { | ||||||||||||||||||||||||||||||||||||||||||||||||
| classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.2.RELEASE") | ||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
| plugins { | ||||||||||||||||||||||||||||||||||||||||||||||||
| id 'java' | ||||||||||||||||||||||||||||||||||||||||||||||||
| id 'eclipse' | ||||||||||||||||||||||||||||||||||||||||||||||||
| id 'idea' | ||||||||||||||||||||||||||||||||||||||||||||||||
| id 'org.springframework.boot' version '3.5.16' | ||||||||||||||||||||||||||||||||||||||||||||||||
| id 'io.spring.dependency-management' version '1.1.7' | ||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| apply plugin: 'java' | ||||||||||||||||||||||||||||||||||||||||||||||||
| apply plugin: 'eclipse' | ||||||||||||||||||||||||||||||||||||||||||||||||
| apply plugin: 'idea' | ||||||||||||||||||||||||||||||||||||||||||||||||
| apply plugin: 'org.springframework.boot' | ||||||||||||||||||||||||||||||||||||||||||||||||
| apply plugin: 'io.spring.dependency-management' | ||||||||||||||||||||||||||||||||||||||||||||||||
| group = 'org.springframework' | ||||||||||||||||||||||||||||||||||||||||||||||||
| version = '0.1.0' | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| java { | ||||||||||||||||||||||||||||||||||||||||||||||||
| toolchain { | ||||||||||||||||||||||||||||||||||||||||||||||||
| languageVersion = JavaLanguageVersion.of(21) | ||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| bootJar { | ||||||||||||||||||||||||||||||||||||||||||||||||
| baseName = 'gs-spring-boot' | ||||||||||||||||||||||||||||||||||||||||||||||||
| version = '0.1.0' | ||||||||||||||||||||||||||||||||||||||||||||||||
| archiveBaseName = 'gs-spring-boot' | ||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| repositories { | ||||||||||||||||||||||||||||||||||||||||||||||||
| mavenCentral() | ||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| sourceCompatibility = 1.8 | ||||||||||||||||||||||||||||||||||||||||||||||||
| targetCompatibility = 1.8 | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| dependencies { | ||||||||||||||||||||||||||||||||||||||||||||||||
| compile("org.springframework.boot:spring-boot-starter-web") | ||||||||||||||||||||||||||||||||||||||||||||||||
| testCompile("junit:junit") | ||||||||||||||||||||||||||||||||||||||||||||||||
| implementation 'org.springframework.boot:spring-boot-starter-web' | ||||||||||||||||||||||||||||||||||||||||||||||||
| implementation 'org.springframework.boot:spring-boot-starter-jdbc' | ||||||||||||||||||||||||||||||||||||||||||||||||
| runtimeOnly 'com.h2database:h2' | ||||||||||||||||||||||||||||||||||||||||||||||||
| testImplementation 'org.springframework.boot:spring-boot-starter-test' | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
25
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 The new automated test never runs in the Gradle build The Gradle build never tells the test runner to use the JUnit 5 engine (missing Gradle defaults to the JUnit 4 framework unless the test task opts into the JUnit Platform
Suggested change
Was this helpful? React with 👍 or 👎 to provide feedback. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not accurate — tasks.named('test') {
useJUnitPlatform()
}The suggestion diff just stops at the |
||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| tasks.named('test') { | ||||||||||||||||||||||||||||||||||||||||||||||||
| useJUnitPlatform() | ||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| #Thu Mar 01 09:01:15 CST 2018 | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-bin.zip | ||
| networkTimeout=10000 | ||
| validateDistributionUrl=true | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Info: properties-migrator kept as a permanent runtime dependency
spring-boot-properties-migratoris documented as a temporary aid to be removed once the upgrade is complete; keeping it as a permanentruntime/runtimeOnlydependency in bothpom.xmlandbuild.gradle:28adds startup overhead and ships in the boot jar. Since this PR completes the 2.x -> 3.x migration and the repo has essentially no application properties (application.propertiesonly contains a commented-out line and it sits at the repo root rather thansrc/main/resources), it could be dropped.Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed — this PR finishes the 2.x → 3.x migration and there are no properties to migrate, so
spring-boot-properties-migratoris dropped from bothpom.xmlandbuild.gradle.