feature: upgrade Spring Boot 2.6.3 -> 4.1.1 (Java 17, Jakarta, Security 6, DGS 12, Jackson 3) - #1070
Open
devin-ai-integration[bot] wants to merge 11 commits into
Open
devin-ai-integration[bot] wants to merge 11 commits into
devin-ai-integration[bot] wants to merge 11 commits into
Conversation
…dle 7.6.4) Co-Authored-By: Chris Livingston <chris.livingston@cognition.ai>
…pring Security 6 SecurityFilterChain, DGS 6.0.5, MyBatis 3.0.3) Co-Authored-By: Chris Livingston <chris.livingston@cognition.ai>
Co-Authored-By: Chris Livingston <chris.livingston@cognition.ai>
…ql starter, codegen 7.0.3) Co-Authored-By: Chris Livingston <chris.livingston@cognition.ai>
Co-Authored-By: Chris Livingston <chris.livingston@cognition.ai>
Co-Authored-By: Chris Livingston <chris.livingston@cognition.ai>
Co-Authored-By: Chris Livingston <chris.livingston@cognition.ai>
….0, MyBatis 4.0.1, Jackson 3, modular starters, MockitoBean) Co-Authored-By: Chris Livingston <chris.livingston@cognition.ai>
…0, MyBatis 4.1.0, json-path 3.0.0) Co-Authored-By: Chris Livingston <chris.livingston@cognition.ai>
…uest parsing 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:
|
…on 3.1.6/2.21.6 (CVE-2026-19032, CVE-2026-83557) Co-Authored-By: Chris Livingston <chris.livingston@cognition.ai>
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
Incremental upgrade of the app from Spring Boot 2.6.3 → 4.1.1 (GA), one version line per commit, with
./gradlew testgreen (68 tests) at every step. No tests were modified or disabled; test changes are limited to import/annotation migrations required by Boot 4's modular test packages.Final versions
graphql-dgs-spring-graphql-starter), codegen plugin 8.6.0spring-boot-starter-flyway(Flyway 12.x, Boot managed)com.fasterxml)tools.jackson; Jackson 2 BOM 2.21.6 for transitive users)Version-by-version path (one commit each)
2.6.3 → 2.7.18 – DGS 5.5.5, MyBatis 2.3.2, Gradle 7.6.4. Pinned
graphql-java.version=19.2(Boot's managed 18.x lackedRuntimeWiring.transformneeded by DGS). CodegentypeMapping PageInfo -> graphql.relay.PageInfoto fix generated-type clash.2.7 → 3.0.13 – Java 17 toolchain;
javax.*→jakarta.*;WebSecurityConfigurerAdapter→SecurityFilterChainbean with lambda DSL,antMatchers→requestMatchers;handleMethodArgumentNotValid(..., HttpStatusCode, ...)signature; DGS 6.0.5; MyBatis 3.0.3; Rest Assured versions delegated to Boot's BOM.3.0 → 3.1.12 – DGS 7.6.0, Gradle 8.5.
3.1 → 3.2.12 – switched to
graphql-dgs-spring-graphql-starter(DGS 8.7.1, DGS now runs on Spring GraphQL); DGSDataFetcherExceptionHandler.onException→ asynchandleExceptionreturningCompletableFuture;spring.graphql.schema.inspection.enabled=falsebecause Spring GraphQL'sSchemaMappingInspectorderives node typeArticlesfromArticlesConnection(schema type isArticle) and fails startup; Spotlesstarget 'src/**/*.java'to avoid an undeclared dependency ongenerateJavaoutput.3.2 → 3.3.13 – DGS 9.2.2, MyBatis 3.0.5.
3.3 → 3.4.13 – DGS 10.1.2.
3.4 → 3.5.16 – DGS 10.6.0.
3.5 → 4.0.8 – Gradle 8.14.3; modular starters (
spring-boot-starter-webmvc,-jdbc,-flyway,-webmvc-test,-security-test,-jdbc-test);@MockBean→@MockitoBean; test imports moved toorg.springframework.boot.webmvc.test.autoconfigure.*,org.springframework.boot.jdbc.test.autoconfigure.*,org.springframework.boot.validation.autoconfigure.*; explicit Rest Assured 5.5.7 (no longer Boot-managed); DGS 11.1.0 (first DGS line built for Boot 4); MyBatis 4.0.1.Jackson 3 migration (Boot 4 default mapper is Jackson 3, so the Jackson 2 customizations were silently ignored → 16 test failures):
com.fasterxml.jackson.annotation.*annotations are unchanged (still the annotation package in Jackson 3).4.0 → 4.1.1 – DGS 12.0.1, codegen 8.6.0, MyBatis 4.1.0. DGS 12 has
json-path {strictly 3.0.0}(Jackson 3 provider) while Boot 4.1.1 still manages json-path 2.10.0 →ClassNotFoundException: Jackson3JsonProviderinDgsQueryExecutor. Fixed withext['json-path.version'] = '3.0.0'inbuild.gradle.Runtime fix (
bug:commit) –POST /graphqlreturned 400Root name ('query') does not match expected ('SerializableGraphQlRequest'). The REST API relies on globalspring.jackson.deserialization.UNWRAP_ROOT_VALUE=true, which Spring GraphQL's HTTP handler also picked up. Verified this was broken since step 4 (Boot 3.5 build reproduces it; original 2.6.3 with DGS's own endpoint works). Fix:GraphQlHttpConfigdefines theGraphQlHttpHandlerbean (auto-config is@ConditionalOnMissingBean) with aJacksonJsonHttpMessageConverterbuilt fromjsonMapper.rebuild().disable(UNWRAP_ROOT_VALUE).Snyk fixes (
bug:commit) – the Snyk PR check flaggedsqlite-jdbc 3.36.0.3(CVE-2023-32697, high) andjackson-databind3.1.5 / 2.21.5 (CVE-2026-19032, CVE-2026-83557). Bumpedsqlite-jdbc→ 3.53.2.1 and pinnedjackson-bom.version=3.1.6,jackson-2-bom.version=2.21.6. Localsnyk_sca_scannow reports 0 issues; build/tests/runtime re-verified.DGS compatibility
DGS releases are tied to Boot lines: 5.x (Boot 2.7), 6.x (3.0), 7.x (3.1), 8.x (3.2), 9.x (3.3), 10.x (3.4/3.5), 11.x+ (Boot 4; per DGS 11.0.0 release notes). DGS 12.0.1 (built against Boot 4.0.0 / Spring GraphQL 2.0.x) works with Boot 4.1.1 — all GraphQL tests pass and the live
/graphqlendpoint answers correctly. No incompatibility blocker was hit.Verification (Boot 4.1.1)
./gradlew clean buildpasses (68 tests, 0 failures). App started from the built jar; banner showsSpring Boot :: (v4.1.1). Exercised via curl:POST /users→POST /users/login(JWT) →POST /articleswithAuthorization: Token <jwt>→GET /articles→ GraphQLarticles(first: 10)query on/graphql. Full log + curl output in the session's evidence file.Notes for reviewers
joda-timeis still used forDateTime(kept to avoid unrelated refactors); serialization now goes through the Jackson 3 module.spring-boot-starter-hateoaspulls Rest Assured / json-path transitively; explicit versions are only where Boot 4 no longer manages them.Devin-Org: engineering
Link to Devin session: https://app.devin.ai/sessions/52eb760e330448d7945177161dba9c06
Open in Devin Desktop: https://app.devin.ai/desktop/session/52eb760e330448d7945177161dba9c06?variant=devin
Requested by: @clivingston-cognition