Skip to content

Migrate to Spring Boot 3.5 (Spring 6, Hibernate 6, Jakarta EE) - #284

Merged
HuiJun merged 4 commits into
developfrom
chore/spring-boot-3-migration
Nov 15, 2026
Merged

HuiJun merged 4 commits into
developfrom
chore/spring-boot-3-migration

Conversation

@devin-ai-integration

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

Copy link
Copy Markdown
Contributor

Summary

Moves MMS from Spring Boot 2.7.18 / Spring 5 to Spring Boot 3.5.16 / Spring 6 to clear the Trivy findings on the boot jar that have no fix on the 2.7 line. No intended behavior change.

Trivy 0.76.2 on the boot jar (CRITICAL,HIGH): 3 critical / 12 high before, 2 critical / 0 high after. The two remaining criticals are spring-webmvc 6.2.19 CVE-2026-47884 and CVE-2026-47890, whose only fixed version is 7.0.9 (Spring Boot 4); they cannot be cleared on Boot 3.

What changed:

  • Build: Gradle wrapper 7.4.2 -> 8.14.7. Every subproject imports the Boot BOM, so the Spring Framework/Security/Data/Logback/SnakeYAML pins in gradle.properties are gone. Four pins remain as patch levels ahead of the BOM, because Boot 3.5.16 ships versions Trivy flags: tomcatVersion, jacksonBomVersion, httpclient5Version, httpcore5Version (the last two also stop the BOM downgrading what the Elasticsearch client asks for).
  • -parameters is now passed to every JavaCompile. Spring 6 no longer reads parameter names from debug info, so without it every @PathVariable/@RequestParam without an explicit name fails with a 500.
  • JUnit 4 tests run through junit-vintage-engine on the JUnit Platform; the tests themselves are untouched.
  • Jakarta: javax.{servlet,persistence,transaction,annotation,validation} -> jakarta.*.
  • Hibernate 6 (rdb): MultiTenancyStrategy no longer exists; multi-tenancy is implied by the connection provider and tenant resolver, which are now typed <String>. SchemaExport moved to hibernate-ant, added as a dependency. PostgreSQL10Dialect was removed; defaults and example properties use PostgreSQLDialect.
  • Spring Security 6: ExampleSecurityConfig exposes a SecurityFilterChain bean instead of extending WebSecurityConfigurerAdapter, and AuthSecurityConfig uses the lambda DSL.
  • springdoc 1.3.1 -> springdoc-openapi-starter-webmvc-ui 2.8.17; OpenAPIConfig subclasses the renamed RequestService.
  • jjwt 0.10.5 -> 0.12.7 (verifyWith(...).build().parseSignedClaims(...)).
  • AWS SDK v1 -> v2 in S3Storage (sync client over the Apache HTTP client, path-style, checksums only when required so S3-compatible stores keep working).

Upgrade notes for deployments:

  • A deployed application.properties that sets spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQL10Dialect must change it to org.hibernate.dialect.PostgreSQLDialect (or drop the line); the old class no longer exists.
  • Hibernate 6.6 supports PostgreSQL 12+. The compose stack still runs PostgreSQL 11 and passes, but Hibernate logs HHH000511 on it.
  • @EnableGlobalMethodSecurity is deprecated in Security 6 but still used, to keep the permission evaluator wiring unchanged.

Verification:

  • All eleven Postman collections pass on a fresh compose stack against Elasticsearch 9.5.6, and all eleven again against OpenSearch 3.9.0 through docker-compose.opensearch.yml. Locally the image was built from the Gradle-built boot jar with the same runtime stage as the Dockerfile, because Maven Central rate-limited the in-container build.
  • /v3/api-docs and the Swagger UI respond.
  • ./gradlew build -x test succeeds. ./gradlew build fails on the same seven tests that fail on develop: two in DefaultCommitServiceTest (crud) and five in TwcPermissionUtilsTest (twc, MultiValueMap must not be null). None are addressed here.
  • Not exercised: LDAP, TWC and OAuth authentication against real servers, and S3 against AWS itself (only S3Mock).

🟢 Devin Review found nothing to fix · View findings · Follow Devin's work

Devin Review

… SDK v2

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor 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

Co-Authored-By: jason.han <hanhuijun@gmail.com>

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Devin Review found 1 finding. Devin automatically fixed it.

Fixed by Devin (1)
  • Unclosed S3 clients after initialization failures — When the store is unreachable or bucket creation fails, each request built and abandoned a client; the client is now closed before rethrowing.

View findings in Devin Review · Follow Devin's work

Devin Review

github-advanced-security[bot]

This comment was marked as resolved.

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

Browser-tested 9040cb0 against a fresh local Elasticsearch stack.

Swagger UI and JWT flow

  • /v3/swagger-ui.html loads, lists the MMS operations in alphabetical order with operation ids.
  • Injected Map parameters are absent from getRefCommits and getAllElements; their real parameters are shown.
  • Login through the UI returns a JWT and bearerToken authorization accepts it.
  • Authenticated POST /orgs and GET /orgs return 200 and round-trip the created organization; the same POST without authorization returns 401.
Authenticated creation, 200 Unauthenticated write, 401
Swagger authenticated POST Swagger unauthenticated POST

Open documentation issue, not attributed

Expanding getRefCommits reports unresolved #/components/schemas/ElementVersion references. The generated document has exactly three, under Commit.{added,updated,deleted}.items (from the @ArraySchema(... implementation = ElementVersion.class) annotations in CommitJson), and no other unresolved references.

Whether this is new could not be established: a jar built from develop returns HTTP 500 for /v3/api-docs (NoSuchMethodError: AnnotationIntrospector.findPropertiesToIgnore(Annotated, boolean) from swagger-core 2.1.2), so Swagger UI does not load there at all.

develop: API definition fails to load This PR: unresolved schema references
Develop Swagger failure PR unresolved schema references

…I document

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

Retested Swagger UI on ffc9dd5 against the local Elasticsearch-backed stack; the running jar's hash matched the freshly built revision.

ElementVersion schema fix — passed
  • Expanding getRefCommits no longer displays resolver errors.
  • Commit added/updated/deleted items render id, type, _previousDocId, _docId, and _deleted.
  • Whole-document audit of /v3/api-docs: 36 paths, 128 reference occurrences, 51 unique references, zero unresolved references.
Commit response arrays Elements parameter filtering
Resolved ElementVersion fields No injected Map parameter
JWT and parameter-filtering regressions — passed

Swagger loads; UI login issues a JWT and bearerToken authorization works.
Authenticated POST /orgs creates the test organization with HTTP 200 and no rejections.
The same POST without authorization returns HTTP 401.
getRefCommits and getAllElements retain their legitimate parameters without injected Map inputs.

Authenticated write — 200 Unauthenticated write — 401
Authenticated POST Unauthorized POST

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

Browser-tested View Editor 5.0.0 (Open-MBEE/ve 25c66a3) against a local merge of this PR and #285 into develop (b3c0f3f), and against plain develop as a baseline. Both on Elasticsearch 9.5.6 with the same seeded data.

What works

With CORS_ALLOWED_ORIGINS set to the View Editor origin, login, project/document navigation, rename + save + reload, search and selecting a previous version work on both builds. On the merged build, creating a paragraph in View Editor, saving, reloading and rendering it also works (not repeated on the baseline).

develop: search and history merged: search and history
develop search and history merged search and history
Caveats
  • With the default cors.allowed.origins=*, browser login fails on both builds: OPTIONS /authentication returns 500 (When allowCredentials is true, allowedOrigins cannot contain the special value "*"). Same on Spring Web 5.3.39 and 6.2.19, so it is not introduced by this PR.
  • The inspector shows the author as a JSON object on both builds.
  • One request on the merged build, restoring a cover-page view at an old commit id, returned 400. It was not reproduced on the baseline and is unclassified; a stale commit id from resetting the stacks is suspected. History on a freshly edited document works on both builds.
  • The Postman cameo data lacks View Editor's project root element, so supplemental model data was added to both stacks.
  • Not tested: OpenSearch, LDAP/TWC/OAuth logins, upgrading an existing deployment's data.

Written by Devin

…ials provider

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@HuiJun
HuiJun merged commit 3943c78 into develop Nov 15, 2026
4 checks passed
@devin-ai-integration
devin-ai-integration Bot deleted the chore/spring-boot-3-migration branch November 20, 2026 02:33
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.

2 participants