Skip to content

Migrate from Java 8 to Java 11#15

Open
devin-ai-integration[bot] wants to merge 2 commits into
masterfrom
devin/1777053417-java8-to-java11-migration
Open

Migrate from Java 8 to Java 11#15
devin-ai-integration[bot] wants to merge 2 commits into
masterfrom
devin/1777053417-java8-to-java11-migration

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot commented Apr 24, 2026

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

  1. Spring Boot 2.0.2 → 2.7.18 (pom.xml, build.gradle)
  2. Java version 1.8 → 11 (pom.xml properties, build.gradle source/targetCompatibility)
  3. Fixed H2 SQL syntaxDROP TABLE customers IF EXISTSDROP TABLE IF EXISTS customers (required by newer H2 bundled with Spring Boot 2.7.x)
  4. Removed dead cfapps.io API calls — the quoter service is offline; removed both call sites in Application.java along with unused Quote, RestTemplate, and RestTemplateBuilder imports/beans
  5. Removed spring-boot-properties-migrator dependency (only needed for 1.x → 2.x migration)
  6. Fixed deprecated Gradle syntaxcompile/testCompileimplementation/testImplementation; baseName/versionarchiveBaseName/archiveVersion
  7. Synced Gradle dependencies with Maven — added spring-boot-starter-jdbc and h2 to build.gradle
  8. Upgraded Gradle wrapper 4.6 → 7.6.4 (Gradle 4.6 does not support Java 11+)
  9. Fixed Maven packaging — changed <packaging>pom</packaging> to <packaging>jar</packaging> so spring-boot:run and JAR generation work correctly

Validation performed

Check Result
./mvnw dependency:resolve Pass
./mvnw compile Pass
./mvnw clean package Pass
./gradlew compileJava (JAVA_HOME=java11) Pass
./gradlew clean build bootJar (JAVA_HOME=java11) Pass
./mvnw spring-boot:run — app startup Pass — H2 tables created, customers inserted and queried, no exceptions

Review & Testing Checklist for Human

  • Run ./mvnw spring-boot:run and verify the app starts, H2 table creation succeeds, and customer records are inserted/queried
  • Run JAVA_HOME=/path/to/java11 ./gradlew clean build to confirm Gradle build (Gradle 7.6.4 requires Java 11, not 21)
  • Hit http://localhost:8080/ and http://localhost:8080/topic endpoints to verify REST API works
  • Verify Quote and Value model classes are still present (kept for potential future use) but no longer called at startup

Notes

  • The new Object[]{"Josh"} parameter in JdbcTemplate.query() triggers a deprecation warning (deprecated in Spring 5.3+). This is cosmetic and does not affect functionality.
  • Gradle builds require JAVA_HOME pointing to Java 11 since the system default may differ.
  • No CI is configured for this repository.

Link to Devin session: https://app.devin.ai/sessions/541b4ffde2084f378be727ec1bf4ed2a
Requested by: @parkerduff

devin-ai-integration Bot and others added 2 commits April 24, 2026 18:00
- 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>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@devin-ai-integration
Copy link
Copy Markdown
Author

End-to-End Test Results

Method: Started app locally via ./mvnw spring-boot:run, tested REST endpoints in browser, validated Gradle build and Java version via shell.

Migration Validation (6/6 passed)
Test Result
App starts without exceptions (H2 tables created, customers inserted/queried) Passed
GET / returns {"id":1,"content":"Hello, World!"} Passed
GET /topic returns 3 topics (spring, java, javascript) Passed
GET /datetime returns java.time output (dates, leap year, timezone) Passed
Gradle clean build succeeds with Java 11 Passed
java -version confirms 11.0.30 runtime Passed
Screenshots

GET / — Greeting endpoint

GET / returns greeting JSON

GET /topic — Topic list endpoint

GET /topic returns 3 topics

GET /datetime — DateTime endpoint

GET /datetime returns java.time output

Devin session

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants