Migrate from Java 8 / Spring Boot 2.0.2 to Java 21 / Spring Boot 3.3.5#16
Open
devin-ai-integration[bot] wants to merge 3 commits into
Open
Migrate from Java 8 / Spring Boot 2.0.2 to Java 21 / Spring Boot 3.3.5#16devin-ai-integration[bot] wants to merge 3 commits into
devin-ai-integration[bot] wants to merge 3 commits into
Conversation
- Update pom.xml: Java 21, Spring Boot 3.3.5, remove spring-boot-properties-migrator - Update build.gradle: plugin 3.3.5, Java 21, implementation/testImplementation, archiveBaseName - Fix H2 SQL syntax: DROP TABLE IF EXISTS (standard SQL for H2 2.x) - Fix deprecated JdbcTemplate.query(): use varargs overload instead of Object[] - Update Maven wrapper to 3.9.9 - Update Gradle wrapper to 8.10.2 Co-Authored-By: Chris Livingston <chris.livingston@cognition.ai>
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:
|
Devin Review
|
…cies - pom.xml: change packaging from 'pom' to 'jar' so Maven compiles sources - build.gradle: add spring-boot-starter-jdbc and h2 dependencies to match pom.xml Co-Authored-By: Chris Livingston <chris.livingston@cognition.ai>
The external quoter service is no longer available and causes ResourceAccessException on startup, crashing the app in Spring Boot 3.x. Co-Authored-By: Chris Livingston <chris.livingston@cognition.ai>
Author
End-to-End Test ResultsAll 4 tests passed. App runs on JDK 21 + Spring Boot 3.3.5, H2 operations work, all REST endpoints respond correctly. Test 1: App startup with H2 + JDBC operations (proves migration fixes)
Key log excerpt: Test 2: REST endpoints (Spring Boot 3.x runtime)
Test 3 & 4: Build systems
|
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.RELEASE to Java 21 + Spring Boot 3.3.5, updating all build tooling and fixing breaking changes.
Changes
pom.xml2.0.2.RELEASE→3.3.51.8→21spring-boot-properties-migratordependency (only needed for 1.x→2.x migration)pom→jar(was preventing Maven from compiling sources)build.gradle2.0.2.RELEASE→3.3.5sourceCompatibility/targetCompatibility:1.8→21compile→implementation,testCompile→testImplementationbaseName/version→archiveBaseName/archiveVersionspring-boot-starter-jdbcandh2dependencies (to match pom.xml)src/main/java/hello/Application.javaDROP TABLE customers IF EXISTS→DROP TABLE IF EXISTS customers(H2 2.x requires standard SQL)JdbcTemplate.query(): swappednew Object[]{"Josh"}to varargs overload (RowMapperbefore args)gturnquist-quoters.cfapps.ioREST calls (service is offline, causedResourceAccessExceptioncrash on startup in Spring Boot 3.x).mvn/wrapper/maven-wrapper.properties3.3.9→3.9.9gradle/wrapper/gradle-wrapper.properties4.6→8.10.2Files intentionally unchanged
All model/controller/service/declaration files use Java 8 features (streams, lambdas,
java.time, NIO, functional interfaces) that are fully forward-compatible with Java 21.Review & Testing Checklist for Human
./mvnw clean package./gradlew clean build./gradlew bootRunand test endpoints atlocalhost:8080(GET /,GET /topic,GET /datetime)Notes
<packaging>pom</packaging>prevented compilation,build.gradlewas missing JDBC/H2 dependencies, and defunct REST calls crashed the app on startupGET /returns greeting JSON,GET /topicreturns topic list,GET /datetimereturns datetime info,GET /topic/sortreturns sorted topicsLink to Devin session: https://app.devin.ai/sessions/1a864a864ae94267a807f2c2b35cc84d
Requested by: @clivingston-cognition