public interface MockServerConfigurer
WebTestClient.MockServerSpec and expose that
as a shortcut.
An implementation of this interface can be plugged in via
WebTestClient.MockServerSpec.apply(org.springframework.test.web.reactive.server.MockServerConfigurer) where instances are likely obtained
via static methods, e.g.:
import static org.example.ExampleSetup.securitySetup;
// ...
WebTestClient.bindToController(new TestController())
.apply(securitySetup("foo","bar"))
.build();
WebTestClientConfigurer| Modifier and Type | Method and Description |
|---|---|
default void |
afterConfigureAdded(WebTestClient.MockServerSpec<?> serverSpec)
Invoked immediately, i.e.
|
default void |
beforeServerCreated(WebHttpHandlerBuilder builder)
Invoked just before the mock server is built.
|
default void afterConfigureAdded(WebTestClient.MockServerSpec<?> serverSpec)
serverSpec - the serverSpec to which the configurer is addeddefault void beforeServerCreated(WebHttpHandlerBuilder builder)
builder - the builder for the HttpHandler that will handle
requests (i.e. the mock server)