Migrate from Java 8 to Java 15 with Spring Boot 2.7.18#14
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
Migrate from Java 8 to Java 15 with Spring Boot 2.7.18#14devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Build & Dependency Changes: - Update Spring Boot 2.0.2 -> 2.7.18 - Update Java version 1.8 -> 15 - Fix packaging from pom to jar - Add maven-compiler-plugin with release 15 - Update Gradle plugin to 2.7.18, compile->implementation, testCompile->testImplementation - Update baseName->archiveBaseName in Gradle bootJar - Update Maven wrapper to 3.9.6, Gradle wrapper to 7.6.4 - Make gradlew/mvnw executable Code Modernization (Java 15 features): - Use text blocks for multi-line strings (SQL, response templates) - Use var for local variable type inference - Replace Arrays.asList() with List.of() - Replace Paths.get() with Path.of() - Use method references where possible (Topic::getId) Bug Fixes (from branch submissions): - Fix defunct external API URL (cfapps.io -> dummyjson.com) - Add null safety and try-catch for external API calls - Fix getTopicWithId to use orElse(null) instead of bare get() README updated to reflect Java 15. Co-Authored-By: parker.duff@codeium.com <pwjduff@gmail.com>
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 15 / Spring Boot 2.7.18, incorporating patterns and fixes from existing branch submissions (
daniella/migrate-java11,devin/*-java11-upgrade,devin/*-fix-build-and-startup,devin/*-java17-springboot3-migration).Build & Dependency Changes
pom→jar(was preventing executable JAR builds)maven-compiler-pluginwith<release>15</release>; wrapper updated to 3.9.6compile→implementation,testCompile→testImplementation;baseName→archiveBaseName; added missingspring-boot-starter-jdbcandh2deps; wrapper updated to 7.6.4gradlewandmvnwmade executableJava 15 Code Modernization
Application.java, response templates inHelloController.javavar(JEP 286): Local variable type inference throughoutApplication,TopicService,HelloControllerList.of(): ReplacedArrays.asList()for immutable list creationPath.of(): ReplacedPaths.get()(preferred since Java 11)Topic::getIdinstead oftopic -> topic.getId()Bug Fixes (from submissions)
http://gturnquist-quoters.cfapps.io→https://dummyjson.com/quotes/randomgetTopicWithIdto use.orElse(null)instead of bare.get()Review & Testing Checklist for Human
HelloControllerproduce the same output format as before (line continuation\\chars preserve single-line output)mvn clean packagewith JDK 15+ and confirm the JAR is built successfully/topic,/datetime,/topic/string/operationendpoints with Postmanhttps://dummyjson.com/quotes/random) response deserializes correctly into theQuotemodel (field names may differ)Notes
spring-boot-properties-migratordependency is retained since it was in the originalpom.xml--release 15, Gradle with JDK 17 targeting 15)Link to Devin session: https://app.devin.ai/sessions/3597c03ca6f14b8484baf92832364cc8
Requested by: @parkerduff