Interface MockMvcWebTestClient.MockMvcServerSpec<B extends MockMvcWebTestClient.MockMvcServerSpec<B>>

Type Parameters:
B - a self reference to the builder type
All Known Subinterfaces:
MockMvcWebTestClient.ControllerSpec, MockMvcWebTestClient.RouterFunctionSpec
Enclosing interface:
MockMvcWebTestClient

public static interface MockMvcWebTestClient.MockMvcServerSpec<B extends MockMvcWebTestClient.MockMvcServerSpec<B>>
Base specification for configuring MockMvc, and a simple facade around ConfigurableMockMvcBuilder.
Since:
5.3
Author:
Rossen Stoyanchev
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends B>
    T
    alwaysExpect(ResultMatcher resultMatcher)
    Define a global expectation that should always be applied to every response.
    <T extends B>
    T
    Add a MockMvcConfigurer that automates MockMvc setup.
    Shortcut to build the test client.
    Proceed to configure and build the test client.
    <T extends B>
    T
    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>
    T
    Allow customization of DispatcherServlet.
    <T extends B>
    T
    dispatchOptions(boolean dispatchOptions)
    Whether to handle HTTP OPTIONS requests.
    <T extends B>
    T
    filter(jakarta.servlet.Filter filter, String... urlPatterns)
    Add a filter for specific URL patterns.
    <T extends B>
    T
    filters(jakarta.servlet.Filter... filters)
    Add a global filter.