Class ServerWebExchangeContextFilter

java.lang.Object
org.springframework.web.filter.reactive.ServerWebExchangeContextFilter
All Implemented Interfaces:
WebFilter

public class ServerWebExchangeContextFilter extends Object implements WebFilter
Inserts an attribute in the Reactor Context that makes the current ServerWebExchange available under the attribute name EXCHANGE_CONTEXT_ATTRIBUTE. This is useful for access to the exchange without explicitly passing it to components that participate in request processing.

The convenience method getExchange(ContextView) looks up the exchange.

Since:
5.2
Author:
Rossen Stoyanchev
  • Field Details

    • EXCHANGE_CONTEXT_ATTRIBUTE

      public static final String EXCHANGE_CONTEXT_ATTRIBUTE
      Attribute name under which the exchange is saved in the context.
  • Constructor Details

    • ServerWebExchangeContextFilter

      public ServerWebExchangeContextFilter()
  • Method Details