Skip to content

Upgrade Spring Boot to 2.7.18 (DGS 5.6.2, MyBatis starter 2.3.2, sqlite-jdbc 3.49.1.0) - #1252

Open
devin-ai-integration[bot] wants to merge 8 commits into
upgrade/java17-boot3from
devin/unt-5-spring-boot-2.7
Open

devin-ai-integration[bot] wants to merge 8 commits into
upgrade/java17-boot3from
devin/unt-5-spring-boot-2.7

Conversation

@devin-ai-integration

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

Copy link
Copy Markdown

Summary

Plan step s2.2: move the build from Spring Boot 2.6.15 to 2.7.18 on JDK 17.

Dependency Before After
org.springframework.boot 2.6.15 2.7.18
io.spring.dependency-management 1.0.15.RELEASE 1.1.7
mybatis-spring-boot-starter (+ -test) 2.2.2 2.3.2 (last 2.x)
graphql-dgs-spring-boot-starter 4.9.21 5.6.2 (last 5.x; 6.x needs Boot 3)
sqlite-jdbc 3.36.0.3 3.49.1.0
REST Assured 4.5.1 4.5.1 (already the latest 4.x)
Tomcat (ext['tomcat.version']) 9.0.75 9.0.124 (Boot 2.7.18 ships 9.0.83)

Changes worth knowing about:

  • ext['graphql-java.version'] = '19.11': Boot 2.7 manages graphql-java 18.5, but DGS 5.6.2 needs [19.11, 20).
  • federation-graphql-java-support is pinned to 2.1.1 with dependencyManagement. DGS 5.x declares it as the range [2.0, 2.2), and with that range Gradle 8.14 fails to resolve compileClasspath with "Corrupt serialized resolution result".
  • ext['tomcat.version'] = '9.0.124': Tomcat 9.0.83, the version Boot 2.7.18 ships, is affected by CVE-2025-31650, CVE-2025-31651 and CVE-2026-24734.
  • I removed ext['rest-assured.version'] = '4.5.1' because Boot 2.7.18 already manages 4.5.1.
  • GraphQLCustomizeExceptionHandler now overrides handleException (returns a CompletableFuture) and delegates to DefaultDataFetcherExceptionHandler.handleException. It used to override the deprecated onException. Error mapping is unchanged.
  • I added spring-boot-properties-migrator (runtimeOnly) and checked it was on the runtime classpath during the smoke run. It reported no renamed or removed properties, so neither properties file changed. It has been removed again.

Verification (JDK 17)

  • CI build and smoke are green: run 43941415265.
  • Local ./gradlew clean spotlessCheck test: 68 tests in 20 classes, 0 failures, 0 errors and 0 skipped, which matches docs/upgrade/baseline.md.
  • Compiled with -Xlint:deprecation -Xlint:removal. The only remaining warning is WebSecurityConfigurerAdapter, which is deprecated in Spring Security 5.7 and handled in the next step. The earlier onException warning is fixed.
  • scripts/smoke/run.sh: "Smoke check passed: 75 calls recorded … Responses match baseline". The baseline was not regenerated and there are no accepted differences.

Known issue: security/snyk fails

I can't see the Snyk report without a login. I ran an OSV scan of the runtime classpath, base vs this branch: 23 advisories are fixed and 2 new ones remain. Neither of the 2 has an open-source fix on the 2.7 / 5.7 lines, and both go away with the Boot 3 phase:

  • CVE-2026-22746, Spring Security 5.7.11 (fixed in 6.5.10 / 7.0.5).
  • CVE-2026-41001, spring-boot-autoconfigure 2.7.18, Artemis auto-configuration, which this app doesn't use (fixed in 3.5.15 / 4.0.7).

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


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

Devin Review

…sqlite-jdbc 3.49.1.0

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

@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.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Custom reviewers

  • 🧪 Test 2 reviewer: no findings · View
  • 🚩 TD Enterprise Architecture: no findings · View
  • 👁️ TD Information Security: no findings · View
  • 🧠 TD French Language (Bill 96): no findings · View
  • ⏱️ TD API Contracts: no findings · View

Devin Review

…26-24734 fixes

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

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: joel.oshea <joel.oshea@cognition.ai>
… REST Assured 5.5.7) (#1265)

* Apply OpenRewrite UpgradeSpringBoot_3_5 recipe (rewrite-spring via rewrite-recipe-bom 3.37.0)

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

* Finish Boot 3.5 upgrade by hand: DGS 10.6.0, MyBatis 3.0.5, Boot-managed 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>

* Override Boot-managed Jackson (2.21.7) and Tomcat (10.1.59) to patch releases that fix new advisories

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

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

Devin Review found 3 findings. Devin's session did not pick them up; all 3 findings are left for you to triage below.

View findings in Devin Review · Follow Devin's work

Devin Review

Comment thread build.gradle
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.2.2'
implementation 'com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter:4.9.21'
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.

🟡 Legacy GraphQL routes no longer work

Replacing graphql-dgs-spring-boot-starter drops GET query execution and the schema JSON endpoint. GET /graphql requests with JSON bodies return 405; authenticated GET /schema.json requests return 404. Existing query clients and schema tooling lose these routes.

Learn more

DGS 5.6.2 registered DgsRestController.graphql without an HTTP method restriction and enabled DgsRestSchemaJsonController by default. Spring Boot 3.5.16's GraphQlWebMvcAutoConfiguration.graphQlRouterFunction executes GraphQL only for POST requests and explicitly returns 405 for GET requests. It does not register the old schema JSON endpoint. The catch-all authentication rule in securityFilterChain means the schema endpoint regression is observable with an authenticated request; anonymous requests remain unauthorized.

Example: A GET request to /graphql with Content-Type: application/json and body {"query":"{ tags }"} previously executed the query and now returns 405. A valid JWT holder requesting /schema.json previously received the schema and now receives 404.

Recommended fix: Provide compatibility routes for existing GET query requests and schema JSON discovery, retaining authentication on schema discovery. Restrict any GET execution adapter to query operations. Add HTTP integration tests because the current smoke checks exercise GraphQL only through POST.

Devin Review


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

Comment thread build.gradle Resolved
…aphql, empty error locations, trailing slashes) (#1266)

* Restore baseline GraphQL and REST behaviour on Boot 3: application/graphql bodies, empty error locations, trailing-slash URLs

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

* Convert raw application/graphql bodies on /graphql/ too

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

* Match the baseline content type for empty application/graphql bodies

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

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

Devin Review found 1 finding. It is left for you to triage in Devin Review.

View findings in Devin Review · Follow Devin's work

Devin Review

… (expires 2027-02-15) (#1269)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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 3 findings. All 3 findings are left for you to triage below.

Custom reviewers

  • 👁️ TD Information Security: 1 finding · View
  • ⏱️ TD API Contracts: 1 finding · View

View findings in Devin Review · Follow Devin's work

Devin Review

Comment thread build.gradle
plugins {
id 'org.springframework.boot' version '2.6.15'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
id 'org.springframework.boot' version '3.5.16'

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 Information Security: P2 — Known-critical Spring MVC dependency introduced

The org.springframework.boot upgrade introduces spring-webmvc 6.2.19, affected by critical CVE-2026-47890, violating the Dependencies rule. Exploitation requires SSE with view fragments. Current endpoints do not implement that feature.

Devin left this for you to triage: spring-webmvc 6.2.19 comes from the stacked Boot 3.5.16 squash-merge (#1265), and #1269 added a time-boxed Snyk ignore for it. I've been told not to push to this branch. If it ships, a critical CVE stays on the dependency graph under a Snyk exception. I recommend the security owner (Joel) confirms the ignore or that #1265's owner pins a fixed spring-webmvc if one exists.

View in Devin Review · Custom reviewer

Devin Review


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

Comment on lines +57 to +61
if (query.isEmpty()) {
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
response.setContentType(MediaType.APPLICATION_JSON_VALUE);
response.getWriter().write("Invalid GraphQL request - no request body was provided");
return;

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: Empty GraphQL requests return malformed errors

For an empty application/graphql request, GraphQLRawQueryFilter returns plain text labeled application/json. TD CONTRACT §4 requires application/problem+json with a domain code and correlationId; return that shape instead.

Devin left this for you to triage: GraphQLRawQueryFilter comes from the stacked regression-fix PR (#1266), not #1252's own commits, and I've been told not to push to this branch. If it ships, an empty application/graphql request gets plain text labelled application/json instead of the problem+json contract. I recommend #1266's owner either returns problem+json or records it as an accepted difference against the smoke baseline.

View in Devin Review · Custom reviewer

Devin Review


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

…-core 10.1.59) (#1270)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: joel.oshea <joel.oshea@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown
Author

Merged #1270 into this branch as aadb35c. It pins Tomcat to 10.1.62 (tomcat-embed-core:10.1.55 -> 10.1.62, nothing at 10.1.59). That should clear the 6 tomcat-embed-core Snyk findings: -21707477, -21716509, -21707518, -21707531, -21716521, -21716524.

Checks on head aadb35c: build passed, smoke passed, license/snyk passed. security/snyk still fails, as expected, because of the 9 Spring findings that have no Boot 3 fix (spring-web/webmvc, spring-graphql, spring-security). Those wait on Joel's decision. I couldn't open the Snyk report to confirm the remaining count because it needs a login. On #1270 itself, security/snyk passed.

Written by Devin

…xes (expire 2027-02-15) (#1271)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: joel.oshea <joel.oshea@cognition.ai>

@novus-by-pendo novus-by-pendo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Novus UX Review

The trailing-slash fix leaves the public tag list returning 401 at /tags/, so clients that add a slash are locked out of it.


Manage review settings

.requestMatchers(
ant(HttpMethod.GET, "/articles/**"),
ant(HttpMethod.GET, "/profiles/**"),
ant(HttpMethod.GET, "/tags"))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[warning] The public tag list works at /tags but now returns "unauthorized" at /tags/, even though the new trailing-slash filter makes the other /…/ URLs work. Clients that add a trailing slash will see the tag list refuse them, and the smoke baseline records this 401 as expected. Make the public rules also match the trailing-slash form, or strip the slash before security runs.

Technical details

Security matchers use AntPathRequestMatcher on the raw path, and UrlHandlerFilter is ordered after the security chain. TrailingSlashTest asserts 401 for /tags/ and smoke baseline rest.tags.trailing-slash records 401. Before the upgrade, MVC-aware matchers treated /tags/ the same as /tags. The same mismatch can affect /articles/feed/ and other rules.


Was this review helpful? React with 👍 or 👎 to share your feedback.

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