接口的使用
org.springframework.test.web.servlet.request.RequestPostProcessor
使用RequestPostProcessor的程序包 程序包 说明 org.springframework.test.web.servlet.request Contains built-inRequestBuilder
implementations.org.springframework.test.web.servlet.setup Contains built-inMockMvcBuilder
implementations.org.springframework.test.web.servlet.request中RequestPostProcessor的使用
参数类型为RequestPostProcessor的org.springframework.test.web.servlet.request中的方法 修饰符和类型 方法 说明 B
ConfigurableSmartRequestBuilder. with(RequestPostProcessor requestPostProcessor)
Add the givenRequestPostProcessor
.MockHttpServletRequestBuilder
MockHttpServletRequestBuilder. with(RequestPostProcessor postProcessor)
An extension point for further initialization ofMockHttpServletRequest
in ways not built directly into theMockHttpServletRequestBuilder
.org.springframework.test.web.servlet.setup中RequestPostProcessor的使用
返回RequestPostProcessor的org.springframework.test.web.servlet.setup中的方法 修饰符和类型 方法 说明 default RequestPostProcessor
MockMvcConfigurer. beforeMockMvcCreated(ConfigurableMockMvcBuilder<?> builder, WebApplicationContext context)
Invoked when the MockMvc instance is about to be created with the MockMvc builder and the Spring WebApplicationContext that will be passed to theDispatcherServlet
.RequestPostProcessor
MockMvcConfigurerAdapter. beforeMockMvcCreated(ConfigurableMockMvcBuilder<?> builder, WebApplicationContext cxt)
RequestPostProcessor
SharedHttpSessionConfigurer. beforeMockMvcCreated(ConfigurableMockMvcBuilder<?> builder, WebApplicationContext context)