Interface MockMvcWebTestClient


public interface MockMvcWebTestClient
The main class for testing Spring MVC applications via WebTestClient with MockMvc for server request handling.

Provides static factory methods and specs to initialize MockMvc to which the WebTestClient connects to. For example:

 WebTestClient client = MockMvcWebTestClient.bindToController(myController)
         .controllerAdvice(myControllerAdvice)
         .validator(myValidator)
         .build()
 

The client itself can also be configured. For example:

 WebTestClient client = MockMvcWebTestClient.bindToController(myController)
         .validator(myValidator)
         .configureClient()
         .baseUrl("/path")
         .build();
 
Since:
5.3
Author:
Rossen Stoyanchev