open class SharedHttpSessionConfigurer : MockMvcConfigurer
MockMvcConfigurer that stores and re-uses the HTTP session across multiple requests performed through the same MockMvc instance.
Example use:
import static org.springframework.test.web.servlet.setup.SharedHttpSessionConfigurer.sharedHttpSession; // ... MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new TestController()) .apply(sharedHttpSession()) .build(); // Use mockMvc to perform requests ...
Author
Rossen Stoyanchev
Since
5.0
SharedHttpSessionConfigurer()
MockMvcConfigurer that stores and re-uses the HTTP session across multiple requests performed through the same Example use:
|
open fun afterConfigurerAdded(: ConfigurableMockMvcBuilder<*>): Unit |
|
open fun beforeMockMvcCreated(: ConfigurableMockMvcBuilder<*>, : WebApplicationContext): RequestPostProcessor |
|
open static fun sharedHttpSession(): SharedHttpSessionConfigurer |