接口 RequestPostProcessor

所有已知实现类:
ForwardRequestPostProcessor
函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@FunctionalInterface public interface RequestPostProcessor
Extension point for applications or 3rd party libraries that wish to further initialize a MockHttpServletRequest instance after it has been built by MockHttpServletRequestBuilder or its subclass MockMultipartHttpServletRequestBuilder.

Implementations of this interface can be provided to MockHttpServletRequestBuilder.with(RequestPostProcessor) at the time when a request is about to be constructed.

从以下版本开始:
4.0
作者:
Rossen Stoyanchev, Rob Winch
  • 方法详细资料

    • postProcessRequest

      MockHttpServletRequest postProcessRequest(MockHttpServletRequest request)
      Post-process the given MockHttpServletRequest after its creation and initialization through a MockHttpServletRequestBuilder.
      参数:
      request - the request to initialize
      返回:
      the request to use, either the one passed in or a wrapped one