Skip to main content Link Menu Expand (external link) Document Search Copy Copied
Dark theme

Using a Context


In this module, you’re going to learn:

  • The problem a context solves
  • How the Context API is organized
  • How to write to and read from the context

You can find the code for this module here.

You can also read the context from a Reactive Stream signal. The Signal interface has a method that returns a ContextView instance:

ContextView getContextView()

For more information, read the appendix C.7 from the documentation: What Is a Good Pattern for Contextual Logging? (MDC)

For a real-world example, Spring Security uses the Context API to provide a reactive web filter: ReactorContextWebFilter.


Table of contents