Skip to content

Upgrade to Spring Boot 3.5.16 and jakarta (DGS 10.6.0, MyBatis 3.0.5, REST Assured 5.5.7) - #1265

Merged
devin-ai-integration[bot] merged 3 commits into
devin/unt-5-spring-boot-2.7from
devin/unt-7-spring-boot-3.5
Nov 17, 2026
Merged

devin-ai-integration[bot] merged 3 commits into
devin/unt-5-spring-boot-2.7from
devin/unt-7-spring-boot-3.5

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Summary

Moves the app from Spring Boot 2.7.18 to Spring Boot 3.5.16 (Spring Framework 6.2.19, Security 6.5.11, Hibernate Validator 8.0.3, Tomcat 10.1.55, Flyway 11.7.2). Stacked on #1252 (base devin/unt-5-spring-boot-2.7). Ticket: Bump to Spring Boot 3.5 and jakarta (plan step s3.1).

Three commits, so the recipe output and the hand-written fixes can be reviewed separately:

  1. 71ae08bf: raw output of OpenRewrite org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_5 (rewrite-spring from rewrite-recipe-bom:3.37.0, Gradle plugin 7.39.0, run via an init script so the build file has no rewrite plugin). It does the javax.validation/javax.servlet → jakarta.* change (javax.crypto is left alone), bumps the Boot plugin, MyBatis 3.0.3 and REST Assured 5.1.1, and removes redundant @Autowired.

  2. f1d99487: hand fixes:

    • build.gradle: DGS graphql-dgs-spring-boot-starter:5.6.2 → graphql-dgs-spring-graphql-starter:10.6.0. DGS 10.2.4–10.6.0 is the line built against Boot 3.5; DGS 11 targets Boot 4. Codegen stays 8.8.0, the latest release. MyBatis starter goes to 3.0.5 and sqlite-jdbc to 3.54.1.0. REST Assured now uses the Boot-managed 5.5.7. The 2.7-era overrides graphql-java.version, tomcat.version (9.0.124) and the federation-graphql-java-support pin are removed. The javax.xml.bind:jaxb-api that the recipe added is dropped because nothing uses it. Flyway 11.7.2 still ships SQLite in flyway-core, so no extra module is needed.
    • WebSecurityConfig: .dispatcherTypeMatchers(DispatcherType.ERROR).permitAll(). Security 6 authorizes every dispatch type, so the /error forward after a 404 or 403 was being answered with 401 (6 smoke calls).
    • New GraphQLHttpConfig: supplies the GraphQlHttpHandler with a converter whose ObjectMapper is a copy of the app mapper with UNWRAP_ROOT_VALUE disabled. DGS 10 serves /graphql through Spring for GraphQL, which reads the body with the MVC converters, and spring.jackson.deserialization.UNWRAP_ROOT_VALUE=true (needed by the REST API) made every GraphQL request fail with 400 Failed to read request.
    • GraphQLCustomizeExceptionHandler needed only the jakarta import. It already implements the async CompletableFuture handleException API and delegates to DefaultDataFetcherExceptionHandler, which DGS 10 still provides.
    • spring-boot-properties-migrator was added and bootRun produced no migration warnings, so it was removed in the same commit.
  3. 0a08fb72: ext['jackson-bom.version'] = '2.21.7' and ext['tomcat.version'] = '10.1.59'. These patch releases fix advisories that are new versus base in the versions Boot 3.5.16 manages: jackson 2.21.4 (GHSA-p6pp-m3f8-5c89, GHSA-q4xh-88c3-wmh7, GHSA-mhm7-754m-9p8w) and tomcat 10.1.55 (7 advisories, 5 critical).

Verification (local, JDK 17)

  • ./gradlew clean spotlessCheck build: BUILD SUCCESSFUL, 68 tests in 20 classes, 0 failures (same as the baseline).
  • bootRun starts and the GraphQL endpoint is mapped at POST /graphql.
  • scripts/smoke/run.sh: all 75 calls and every assertion pass (0 FAIL), but the baseline diff is not empty, so the script exits 1 and the CI smoke job is red with the same diff. The baseline was not regenerated. Differences, all in the shape of GraphQL errors[]:
Call Baseline (DGS 5 / graphql-java 19) Now (DGS 10.6 / graphql-java 24.3)
graphql.login.bad-password (custom TypedGraphQLError, UNAUTHENTICATED) "locations": [] locations key omitted (graphql-java 22+ drops empty locations)
graphql.me.no-auth, graphql.createArticle.no-auth, graphql.feed.no-auth (DGS default handler, INTERNAL) "locations": [] "locations": [{"line","column"}]

Status codes, errorType values and data shapes are unchanged. The INTERNAL result for unauthenticated calls is the bug that already exists on master and is out of scope.

Snyk

security/snyk is red on 0a08fb72. I can't open the Snyk report without a login, so this comes from an OSV scan of the runtime and test classpaths, base a1a428e9 vs this head:

  • Fixed by this PR: CVE-2026-41001 (spring-boot-autoconfigure 2.7.18) and CVE-2026-22746 (spring-security-core 5.7.11), plus ~70 other advisories against Boot 2.7, Spring 5.3, Security 5.7, snakeyaml 1.30 and logback 1.2.
  • Still new vs base: CVE-2026-47890 / GHSA-j9f9-w8pj-32f8 (critical) in spring-webmvc 6.2.19. Every 6.2.x is affected and the only fix is 7.0.9 (Spring Framework 7 / Boot 4). No 6.2.20 is published, so Boot 3.5 cannot clear it.

This PR adds no Snyk ignores and does not change the policy.

Known differences handed to UNT-8

The manager accepted these for this step. They move to the "Fix Boot 3 test and behaviour regressions" step; the baseline is unchanged.

  • 415 on raw GraphQL: POST /graphql with Content-Type: application/graphql (raw query body) returns 415 on DGS 10 / Spring for GraphQL. DGS 5 accepted it.
  • errors[].locations shapes (4 smoke calls):
    • graphql.login.bad-password: locations is omitted; the baseline has "locations": [].
    • graphql.me.no-auth, graphql.createArticle.no-auth, graphql.feed.no-auth: "locations": [{"line","column"}]; the baseline has "locations": [].

The spring-webmvc CVE-2026-47890 (see Snyk above) has gone to Joel for a decision.

Other notes

  • Compiler [removal] warnings only: AntPathRequestMatcher in WebSecurityConfig and @MockBean in tests (deprecated in Security 6.5 and Boot 3.4).

Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/fd777e7a0c4249aab846188357ca1cbc
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/fd777e7a0c4249aab846188357ca1cbc?variant=devin
Requested by: @joeloshea-cog


👀 2 findings for you to triage · Follow Devin's work

Devin Review

devin-ai-integration Bot and others added 2 commits November 17, 2026 09:03
…write-recipe-bom 3.37.0)

Co-Authored-By: joel.oshea <joel.oshea@cognition.ai>
…ged REST Assured 5.5.7, sqlite-jdbc 3.54.1.0, permit ERROR dispatch, unwrapped JSON for /graphql

Co-Authored-By: joel.oshea <joel.oshea@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown
Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

…releases that fix new advisories

Co-Authored-By: joel.oshea <joel.oshea@cognition.ai>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 findings. All 2 findings are left for you to triage below.

Custom reviewers

  • ⏱️ TD API Contracts: 1 finding · View

View findings in Devin Review · Follow Devin's work

Devin Review

Comment on lines +23 to +24
return new GraphQlHttpHandler(
webGraphQlHandler, new MappingJackson2HttpMessageConverter(graphQlMapper));

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Raw GraphQL requests rejected with 415

For application/graphql requests, GraphQlHttpHandler now returns HTTP 415 instead of executing the raw query. Its dedicated MappingJackson2HttpMessageConverter accepts only JSON media types, breaking clients supported by the previous DGS controller.

Devin left this for you to triage: This is real, but GraphQLHttpConfig is not the cause: I removed it and the stock Spring for GraphQL handler that DGS 10 uses still returns 415 for application/graphql. Raw-query POSTs worked on DGS 5 and stop working after this upgrade, and no smoke call covers them. Restoring them needs a custom converter (follow-up or regression step); the RealWorld clients send application/json.

Learn more

The previous DGS controller explicitly accepted Content-Type: application/graphql and treated the body as a query document. Spring GraphQL's HTTP request predicate still accepts that media type, but the custom converter supports only application/json and application/*+json. AbstractGraphQlHttpHandler.readBody checks the supplied converter's canRead result and throws HttpMediaTypeNotSupportedException before query execution. Merely adding the media type to Jackson's supported list cannot parse a raw GraphQL document as JSON.

Example: curl http://localhost:8080/graphql -H 'Content-Type: application/graphql' --data 'query { tags }' previously returned tag data and now receives HTTP 415.

Recommended fix: Preserve the isolated JSON mapper while adding explicit raw-document handling for application/graphql. Use a converter or HTTP adapter that wraps raw documents as GraphQL requests and delegates JSON requests to the current converter. Add transport regression coverage for both raw documents and root-unwrapped JSON requests.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread build.gradle
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.3.2'
implementation 'com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter:5.6.2'
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.5'
implementation 'com.netflix.graphql.dgs:graphql-dgs-spring-graphql-starter:10.6.0'

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⏱️ TD API Contracts: GraphQL login errors lose locations

After the DGS upgrade, graphql.login.bad-password returns no errors[].locations, previously [] in the smoke baseline. GraphQL clients expecting that field break, and the unchanged baseline fails. Preserve locations: [] in handleException or version the endpoint under §8.

Devin left this for you to triage: Known diff, listed in the PR. graphql-java 22+ drops empty locations from the error spec map, so locations: [] cannot be kept without post-processing every error response. The 3 no-auth errors now carry real locations. The manager has to decide whether to accept this diff or hand it to the regression step; the baseline was not regenerated.

View in Devin Review · Custom reviewer

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@devin-ai-integration
devin-ai-integration Bot merged commit 48b5629 into devin/unt-5-spring-boot-2.7 Nov 17, 2026
8 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant