Upgrade to Java 17 and Spring Boot 3.5.16 - #75
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
…tooling Co-Authored-By: Joe Benson <joe.benson@cognition.ai>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Joe Benson <joe.benson@cognition.ai>
Runtime verification — Java 17 / Spring Boot 3.5.16 upgradeBuilt and ran the boot jar on JDK 17 ( REST API — all routes verified against the running jar
Full CRUD round trip (POST → PUT → DELETE) verified in the browser: Startup: Tomcat 10.1.55, H2 insert/query, quote URL WARN-onlyThe Josh rows confirm the new varargs Adversarial input — no Spring 6 migration fallout
The single 500 is Builds
|
Summary
Java 8 → 17, Spring Boot
2.0.2.RELEASE→3.5.16(Jakarta EE 10, Tomcat 10.1), plus build tooling that can actually run on a 17 JDK: Gradle wrapper4.6→8.14.5, Maven wrapper3.3.9→3.9.16. No javax.* imports existed, so the Jakarta switch is a no-op for the source.Non-obvious bits beyond the version bumps:
pom.xmlhad<packaging>pom</packaging>, sospring-boot-maven-plugin:repackagenever produced a runnable artifact. Changed tojar;./mvnw clean packagenow yields a bootabletarget/gs-spring-boot-0.1.0.jar.build.gradleonly declaredstarter-web+junitwhile the code usesJdbcTemplateand H2, so a Gradle build ofApplication.javacould not have compiled. Addedstarter-jdbc,h2, and the properties migrator so the Gradle and Maven builds are equivalent. Alsocompile/testCompile→implementation/testImplementation,bootJar.baseName/version→archiveBaseName/archiveVersion(removed in Gradle 8), and Java version via a toolchain rather than thesourceCompatibilityproject property (removed in Gradle 9).jdbcTemplate.query(sql, Object[] args, RowMapper)was removed in 6.0 → varargs formquery(sql, rowMapper, "Josh").http://gturnquist-quoters.cfapps.io/api/random(a domain that no longer resolves) is hit twice — inmainand in theCommandLineRunnerbean — and under Boot 3 an exception there fails the whole application run. Both call sites now go through onelogRandomQuotehelper that catchesRestClientExceptionand warns instead of aborting startup.gs-spring-boot.iml(pinnedJDK_1_8and 2.0.2 dependency versions) and gitignored*.iml,target/,build/,.gradle/; committed build output was previously tracked undertarget/.application.propertiescontains only a commented-outserver.port, so nothing to migrate.Verified locally on JDK 17:
mvn clean packageand./gradlew buildboth succeed, the boot jar starts on Tomcat 10.1,GET /returns 200,GET /topicreturns the topic JSON, the H2 customer insert/query runs, and the unreachable quote endpoint only logs a warning.Link to Devin session: https://app.devin.ai/sessions/de65fc6627bf43f2b4a8d92ba9239d18
Requested by: @joebensoncog97
Devin Review