Migrate from Java 11 + Spring Boot 2.6.3 to Java 21 + Spring Boot 3.2.5#527
Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Open
Migrate from Java 11 + Spring Boot 2.6.3 to Java 21 + Spring Boot 3.2.5#527devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Conversation
- Update Gradle wrapper to 8.7 for Java 21 compatibility - Update Spring Boot 2.6.3 -> 3.2.5, dependency-management 1.0.11 -> 1.1.5 - Update Java sourceCompatibility/targetCompatibility 11 -> 21 - Update DGS codegen plugin 5.0.6 -> 6.2.1, spotless 6.2.1 -> 6.25.0 - Update mybatis-spring-boot-starter 2.2.2 -> 3.0.3 - Update DGS graphql-dgs-spring-boot-starter -> graphql-dgs-spring-graphql-starter 8.5.0 - Update JJWT 0.11.2 -> 0.12.5 (new builder/parser API) - Update sqlite-jdbc 3.36.0.3 -> 3.45.3.0, joda-time 2.10.13 -> 2.12.7 - Update REST Assured 4.5.1 -> 5.4.0 - Rename all javax.* imports to jakarta.* across 21 Java files - Migrate WebSecurityConfig from WebSecurityConfigurerAdapter to SecurityFilterChain - Update CustomizeExceptionHandler for Spring Boot 3 signature change - Update DGS GraphQLCustomizeExceptionHandler to async handleException API - Convert graphql.relay.PageInfo to generated types in datafetchers - Disable Spring GraphQL schema inspection for custom connection types - Fix JJWT test key length for HS512 minimum requirement Co-Authored-By: Kyu Choi <kyuhwanchoi0423@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:
|
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
Full migration from Java 11 / Spring Boot 2.6.3 to Java 21 / Spring Boot 3.2.5. All 68 existing tests pass after migration.
Key changes:
javax.validation.*/javax.servlet.*imports →jakarta.*across 21 filesWebSecurityConfigurerAdapter(deleted in Security 6); replaced withSecurityFilterChainbean using lambda DSL andrequestMatchersinstead ofantMatcherssubject(),expiration(),parser().verifyWith(),parseSignedClaims(),getPayload()) and removed deprecatedSignatureAlgorithmenumgraphql-dgs-spring-boot-starter:4.9.21tographql-dgs-spring-graphql-starter:8.5.0. Exception handler migrated from synconExceptionto asynchandleException(returnsCompletableFuture)graphql.relay.DefaultPageInfowith DGS-generatedio.spring.graphql.types.PageInfoin both datafetchers to fix type incompatibilityspring.graphql.schema.inspection.enabled=falseto work around Spring GraphQL's strict Relay Connection type validationReview & Testing Checklist for Human
WebSecurityConfigauthorization rules are equivalent — the migration fromantMatchers/authorizeRequeststorequestMatchers/authorizeHttpRequestscan have subtle path-matching differences. Confirm that/graphql,/graphiql, public GET endpoints, and auth-required endpoints behave identically to before.spring.graphql.schema.inspection.enabled=false— this was needed because the customArticlesConnection/CommentsConnectiontypes don't follow the standard RelayConnectionspec that Spring GraphQL expects. Verify this is acceptable vs restructuring the schema.jwt.secretlength — JJWT 0.12.x enforces a minimum 64-byte key for HS512. The secret inapplication.propertiesappears long enough (~88 chars) but any environment-specific override must also meet this requirement.graphql-dgs-spring-boot-starter→graphql-dgs-spring-graphql-starter) — this changes the underlying GraphQL integration layer. Run the app and hit GraphQL endpoints to verify queries/mutations work end-to-end../gradlew bootRunand exercise the REST API and GraphQL endpoints to validate runtime behavior beyond unit tests.Notes
gradlewscript diff is large but is entirely auto-generated by./gradlew wrapper --gradle-version 8.7— no manual changes.joda-timeis retained (upgraded to 2.12.7) rather than replaced withjava.timeto minimize scope of this migration.generateJavatask config changed fromtasks.named('generateJava')to top-levelgenerateJava {}block to match DGS codegen plugin 6.x API.Link to Devin session: https://app.devin.ai/sessions/86a0b2d6068844588f2fff8a184c206f
Requested by: @choikh0423