Migrate from Java 11 to Java 17 (Spring Boot 2.x path)#27
Open
devin-ai-integration[bot] wants to merge 3 commits into
Open
Migrate from Java 11 to Java 17 (Spring Boot 2.x path)#27devin-ai-integration[bot] wants to merge 3 commits into
devin-ai-integration[bot] wants to merge 3 commits into
Conversation
- Bump sourceCompatibility/targetCompatibility from 11 to 17 - Upgrade Spring Boot from 2.6.3 to 2.7.18 - Update dependency versions for Java 17 compatibility: mybatis-spring-boot-starter 2.2.2 → 2.3.2 graphql-dgs-spring-boot-starter 4.9.21 → 5.5.1 sqlite-jdbc 3.36.0.3 → 3.42.0.1 jjwt 0.11.2 → 0.11.5 joda-time 2.10.13 → 2.12.7 rest-assured 4.5.1 → 5.3.2 - Add --add-opens JVM flags for tests (Java 17 strong encapsulation) - Update CI workflow to use JDK 17 (temurin) with setup-java@v3 Co-Authored-By: numair.baseer <numair.baseer@windsurf.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:
|
Co-Authored-By: numair.baseer <numair.baseer@windsurf.com>
- Upgrade Spotless plugin 6.2.1 → 6.25.0 (supports Java 17 module system) - Override graphql-java version to 19.2 (DGS 5.5.1 requires it, Spring Boot BOM was forcing 18.5) - Use rest-assured BOM (enforcedPlatform) to prevent Spring Boot from downgrading transitive rest-assured modules - Apply spotless formatting fix to DefaultJwtServiceTest.java Co-Authored-By: numair.baseer <numair.baseer@windsurf.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 11 to Java 17 while staying on Spring Boot 2.x (no
javax→jakartanamespace changes needed).Changes in
build.gradle:sourceCompatibility/targetCompatibility:'11'→'17'2.6.3→2.7.18(latest 2.7.x for best Java 17 support)mybatis-spring-boot-starter:2.2.2→2.3.2graphql-dgs-spring-boot-starter:4.9.21→5.5.1sqlite-jdbc:3.36.0.3→3.42.0.1jjwt-*:0.11.2→0.11.5joda-time:2.10.13→2.12.7rest-assured(all modules):4.5.1→5.3.2(usingenforcedPlatformBOM to prevent Spring Boot from downgrading transitive modules)mybatis-spring-boot-starter-test:2.2.2→2.3.2--add-opensJVM flags for tests (Java 17 strong encapsulation)6.2.1→6.25.0(required for Java 17 module system compatibility with google-java-format)graphql-java.versionto19.2(DGS 5.5.1 requires it; Spring Boot 2.7.18 BOM was forcing 18.5)Changes in
.github/workflows/gradle.yml:11(zulu) →17(temurin)setup-java:v2→v3actions/checkout:v2→v4actions/cache:v2→v4(v2 is deprecated and causes CI failures)Spotless formatting:
DefaultJwtServiceTest.java(minor formatting change from upgraded formatter)Review & Testing Checklist for Human
./gradlew clean buildlocally with JDK 17 to confirm all 68 tests pass./gradlew bootRunand responds athttp://localhost:8080/tagsjavax.*imports were changed (they should all remain as-is since we stay on Spring Boot 2.x)Notes
javax→jakartanamespace migration is needed.graphql-java.version = '19.2': Spring Boot 2.7.18 manages graphql-java to 18.5, but DGS 5.5.1 requires 19.2.enforcedPlatformBOM: Spring Boot's dependency management was downgradingrest-assured-commonandspring-commonsto 4.5.1 while the main rest-assured modules were at 5.3.2, causingNoSuchMethodError.--add-opensflags are a standard workaround for Java 17's strong encapsulation with reflection-heavy libraries.checkout@v4,cache@v4,setup-java@v3) ascache@v2is now deprecated and causes immediate CI failure.Link to Devin session: https://app.devin.ai/sessions/bef4e524d6c74722bb26363cb5f761a6