Skip to content

[MODLISTS-229] Spring Boot 4.0 and friends updates#278

Merged
ncovercash merged 1 commit intomasterfrom
modlists-229
Mar 9, 2026
Merged

[MODLISTS-229] Spring Boot 4.0 and friends updates#278
ncovercash merged 1 commit intomasterfrom
modlists-229

Conversation

@ncovercash
Copy link
Member

@ncovercash ncovercash commented Mar 2, 2026

A lot happened here! I'll detail the main changes here since the PR is cumbersome to scroll through.

Spring Boot 4.0 / Spring 7.0 / Jackson 3.0 update

The whole reason we're in this mess...

Updated OpenAPI generation for new annotations, configuration

openapi-generator required updates and some additional parameters to use Spring Boot v4 annotations, Jackson 3, etc. While updating these, I also changed the following:

  • removed java8 option — this doesn't exist, at least not for several major versions;
  • remove legacy dateLibrary=java option:
    • This also doesn't exist, and was causing the generator to fallback to dateLibrary=legacy and giving us the gross java.util.Date,
    • I'm guessing this and the above was meant to be dateLibrary=java8, which provides OffsetDateTime and all the other time classes we know and love, and
    • since dateLibrary=java8 is now the default, we don't need to override it
    • (this also simplified our DTO mappers)

[CONTROVERSIAL]

I found and enabled useOptional as part of a lot of debugging (issues with request validation insisting parameters were required that have since been resolved), but I kind of like the idea of keeping it enabled. Even if we're immediately resolving it inside the controller, it at least provides some reminder to the dev that it's nullable and should be treated as such (beyond a @Nullable hidden inside the generated API interface that we won't ever see).

Let me know what y'all think, though? If we don't want to add this, we can easily revert it.

Migrated from spring-retry to the new built-in retry logic

This created a fair amount of noise as the giant wall of logic from CustomTenantService got shifted to the callee in MigrationService. Fortunately, it is a lot cleaner with the declarative style!

Removed folio-spring-system-user

Okapi is gone, and with it goes the need for handling system users within our module! This let us clean up quite a bit:

  • install-time user creation
  • handling permissions in two places (now just the MD)
  • removing a few environment variables
  • consolidation of API clients

Instead, we have a new RunAsSystemUserService (slimmed version of the original folio-spring-system-user's SystemUserScopedExecutionService) that creates the necessary context and runs given code in it. This makes system user execution as simple as runAsSystemUserService.executeSystemUserScoped(tenant, () -> myClient.doSomething())!

Migrated from Feign to Spring HttpClient

For some reason we were using @RequestHeader on all our path parameters...oops. Surprised we didn't have any issues with that using Feign, but all that's cleaned up now. Feign clients are now HttpClients and beanified in a central HttpClientConfiguration.

Improved exception logging

Convenience that I added while debugging: ListExceptionHandler now logs the entire traceback and nested causes for exceptions instead of just the message.

Removed unused folio-service-tools-spring-* dependencies

These were never used and carried in from the initial commit.

Additional dev dep bumps

No major or breaking changes here

@ncovercash ncovercash force-pushed the modlists-229 branch 2 times, most recently from 50fe780 to c093180 Compare March 6, 2026 22:13
<useSpringBoot3>true</useSpringBoot3>
<useSpringBoot4>true</useSpringBoot4>
<useJackson3>true</useJackson3>
<openApiNullable>false</openApiNullable>
Copy link
Member Author

Choose a reason for hiding this comment

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

this defaults to true, but with SB v4 we want Jackson v3's nullable implementations instead (I don't think we ever use it, but the generator gets mad if useJackson3 and openApiNullable are both true)

@ncovercash ncovercash marked this pull request as ready for review March 6, 2026 22:44
@ncovercash ncovercash requested a review from a team as a code owner March 6, 2026 22:44
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 6, 2026

@ncovercash ncovercash merged commit b936b47 into master Mar 9, 2026
16 checks passed
@ncovercash ncovercash deleted the modlists-229 branch March 9, 2026 13:01
ncovercash added a commit that referenced this pull request Mar 9, 2026
ncovercash added a commit that referenced this pull request Mar 9, 2026
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.

3 participants