接口 MockServerConfigurer


public 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(cn.taketoday.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();
 
从以下版本开始:
4.0
作者:
Rossen Stoyanchev
另请参阅:
  • 方法详细资料

    • afterConfigureAdded

      default void afterConfigureAdded(WebTestClient.MockServerSpec<?> serverSpec)
      Invoked immediately, i.e. before this method returns.
      参数:
      serverSpec - the serverSpec to which the configurer is added