Migrate from Java 8 to Java 11#15
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
Conversation
- Upgrade Spring Boot from 2.0.2 to 2.7.18 (pom.xml + build.gradle) - Update java.version to 11 and sourceCompatibility/targetCompatibility to 11 - Fix H2 SQL syntax: DROP TABLE IF EXISTS customers (standard SQL) - Remove dead cfapps.io quoter API calls and unused imports/beans - Remove spring-boot-properties-migrator dependency (no longer needed) - Fix deprecated Gradle syntax: compile->implementation, baseName->archiveBaseName - Sync Gradle dependencies with Maven: add spring-boot-starter-jdbc and h2 - Upgrade Gradle wrapper from 4.6 to 7.6.4 (required for Java 11 support) Co-Authored-By: parker.duff@codeium.com <pwjduff@gmail.com>
The packaging was incorrectly set to 'pom' which prevented spring-boot:run and proper JAR generation. Changed to 'jar' for a runnable Spring Boot app. Co-Authored-By: parker.duff@codeium.com <pwjduff@gmail.com>
Author
🤖 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:
|
Author
End-to-End Test ResultsMethod: Started app locally via Migration Validation (6/6 passed)
ScreenshotsGET / — Greeting endpointGET /topic — Topic list endpointGET /datetime — DateTime endpoint |
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.
Summary
Migrates the project from Java 8 / Spring Boot 2.0.2 to Java 11 / Spring Boot 2.7.18. All changes validated against both Maven and Gradle builds, plus a successful application startup test.
Changes
pom.xml,build.gradle)pom.xmlproperties,build.gradlesource/targetCompatibility)DROP TABLE customers IF EXISTS→DROP TABLE IF EXISTS customers(required by newer H2 bundled with Spring Boot 2.7.x)cfapps.ioAPI calls — the quoter service is offline; removed both call sites inApplication.javaalong with unusedQuote,RestTemplate, andRestTemplateBuilderimports/beansspring-boot-properties-migratordependency (only needed for 1.x → 2.x migration)compile/testCompile→implementation/testImplementation;baseName/version→archiveBaseName/archiveVersionspring-boot-starter-jdbcandh2tobuild.gradle<packaging>pom</packaging>to<packaging>jar</packaging>sospring-boot:runand JAR generation work correctlyValidation performed
./mvnw dependency:resolve./mvnw compile./mvnw clean package./gradlew compileJava(JAVA_HOME=java11)./gradlew clean build bootJar(JAVA_HOME=java11)./mvnw spring-boot:run— app startupReview & Testing Checklist for Human
./mvnw spring-boot:runand verify the app starts, H2 table creation succeeds, and customer records are inserted/queriedJAVA_HOME=/path/to/java11 ./gradlew clean buildto confirm Gradle build (Gradle 7.6.4 requires Java 11, not 21)http://localhost:8080/andhttp://localhost:8080/topicendpoints to verify REST API worksQuoteandValuemodel classes are still present (kept for potential future use) but no longer called at startupNotes
new Object[]{"Josh"}parameter inJdbcTemplate.query()triggers a deprecation warning (deprecated in Spring 5.3+). This is cosmetic and does not affect functionality.JAVA_HOMEpointing to Java 11 since the system default may differ.Link to Devin session: https://app.devin.ai/sessions/541b4ffde2084f378be727ec1bf4ed2a
Requested by: @parkerduff