Skip to content

Initial documentation for new HandlerWrapper API in Javalin 7#308

Merged
tipsy merged 2 commits intojavalin:masterfrom
vorburger:patch-1
Feb 22, 2026
Merged

Initial documentation for new HandlerWrapper API in Javalin 7#308
tipsy merged 2 commits intojavalin:masterfrom
vorburger:patch-1

Conversation

@vorburger
Copy link
Contributor

Fixes https://github.com/javalin/javalin/issues/2528.

Re. javalin/javalin#2516.

@tipsy how about this, at least as a start? (You could always edit it further after you merge it as-is.)

Copilot AI review requested due to automatic review settings February 21, 2026 22:51
@github-actions
Copy link

github-actions bot commented Feb 21, 2026

🗑 Deploy Preview for javalin.io deleted.

Name Link
🔨 Latest commit 37fa227
🔍 Latest deploy log https://github.com/javalin/website/actions/runs/22275504133

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds initial documentation for the new HandlerWrapper API introduced in Javalin 7. The feature addresses issue #2528 and relates to PR #2516, providing a way to wrap request handlers for use cases like propagating ThreadLocal or ScopedValue contexts.

Changes:

  • Adds a new "Wrapper handlers" subsection to the documentation explaining that wrapper handlers run "around" requests
  • Includes Java and Kotlin code examples demonstrating the app.router.handlerWrapper() API with ScopedValue usage

@vorburger
Copy link
Contributor Author

@tipsy do you want me to amend this with additional changes to implement Copilot's suggestions? Thought I'd ask, first.

@javalin javalin deleted a comment from Copilot AI Feb 22, 2026
@javalin javalin deleted a comment from Copilot AI Feb 22, 2026
@javalin javalin deleted a comment from Copilot AI Feb 22, 2026
@javalin javalin deleted a comment from Copilot AI Feb 22, 2026
@javalin javalin deleted a comment from Copilot AI Feb 22, 2026
@tipsy
Copy link
Member

tipsy commented Feb 22, 2026

@vorburger I think Copilot went a little hard there, I'll merge your PR as is and make a few small adjustments to it :)

@tipsy tipsy merged commit df787e9 into javalin:master Feb 22, 2026
2 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.

3 participants