接口 RequestPostProcessor
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
@FunctionalInterface public interface RequestPostProcessor
Extension point for applications or 3rd party libraries that wish to further initialize aMockHttpServletRequest
instance after it has been built byMockHttpServletRequestBuilder
or its subclassMockMultipartHttpServletRequestBuilder
.Implementations of this interface can be provided to
MockHttpServletRequestBuilder.with(RequestPostProcessor)
at the time when a request is about to be constructed.- 从以下版本开始:
- 3.2
- 作者:
- Rossen Stoyanchev, Rob Winch
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 MockHttpServletRequest
postProcessRequest(MockHttpServletRequest request)
Post-process the givenMockHttpServletRequest
after its creation and initialization through aMockHttpServletRequestBuilder
.
方法详细资料
postProcessRequest
MockHttpServletRequest postProcessRequest(MockHttpServletRequest request)
Post-process the givenMockHttpServletRequest
after its creation and initialization through aMockHttpServletRequestBuilder
.- 参数:
request
- the request to initialize- 返回:
- the request to use, either the one passed in or a wrapped one