接口 MockMvcWebTestClient.MockMvcServerSpec<B extends MockMvcWebTestClient.MockMvcServerSpec<B>>
- 类型参数:
B- a self reference to the builder type
- 所有已知子接口:
MockMvcWebTestClient.ControllerSpec
- 封闭接口:
- MockMvcWebTestClient
public static interface MockMvcWebTestClient.MockMvcServerSpec<B extends MockMvcWebTestClient.MockMvcServerSpec<B>>
Base specification for configuring
MockMvc, and a simple facade
around ConfigurableMockMvcBuilder.-
方法概要
修饰符和类型方法说明<T extends B>
TalwaysExpect(ResultMatcher resultMatcher) Define a global expectation that should always be applied to every response.<T extends B>
Tapply(MockMvcConfigurer configurer) Add aMockMvcConfigurerthat automates MockMvc setup.build()Shortcut to build the test client.Proceed to configure and build the test client.<T extends B>
TdefaultRequest(RequestBuilder requestBuilder) Define default request properties that should be merged into all performed requests such that input from the client request override the default properties defined here.<T extends B>
TAllow customization ofDispatcherServlet.<T extends B>
TAdd a filter for specific URL patterns.<T extends B>
Tfilters(jakarta.servlet.Filter... filters) Add a global filter.
-
方法详细资料
-
filters
Add a global filter.This is delegated to
ConfigurableMockMvcBuilder.addFilters(Filter...). -
filter
Add a filter for specific URL patterns.This is delegated to
ConfigurableMockMvcBuilder.addFilter(Filter, String...). -
defaultRequest
Define default request properties that should be merged into all performed requests such that input from the client request override the default properties defined here.This is delegated to
ConfigurableMockMvcBuilder.defaultRequest(RequestBuilder). -
alwaysExpect
Define a global expectation that should always be applied to every response.This is delegated to
ConfigurableMockMvcBuilder.alwaysExpect(ResultMatcher). -
dispatcherServletCustomizer
Allow customization ofDispatcherServlet.This is delegated to
ConfigurableMockMvcBuilder.addDispatcherServletCustomizer(DispatcherServletCustomizer). -
apply
Add aMockMvcConfigurerthat automates MockMvc setup.This is delegated to
ConfigurableMockMvcBuilder.apply(MockMvcConfigurer). -
configureClient
WebTestClient.Builder configureClient()Proceed to configure and build the test client. -
build
WebTestClient build()Shortcut to build the test client.
-