spring-framework / org.springframework.test.web.servlet.setup / SharedHttpSessionConfigurer / <init>

<init>

SharedHttpSessionConfigurer()

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