interface MockServerConfigurer
Contract that frameworks or applications can use to pre-package a set of customizations to a WebTestClient.MockServerSpec and expose that as a shortcut.
An implementation of this interface can be plugged in via WebTestClient.MockServerSpec#apply 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();
Author
Rossen Stoyanchev
Since
5.0
See Also
WebTestClientConfigurer
open fun afterConfigureAdded(serverSpec: MockServerSpec<*>): Unit
Invoked immediately, i.e. before this method returns. |
|
open fun beforeServerCreated(builder: WebHttpHandlerBuilder): Unit
Invoked just before the mock server is built. Use this hook to inspect and/or modify application-declared filtes and exception handlers, |