public class UriConfigurer extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_HOST
The defalt host for documented URIs.
|
static int |
DEFAULT_PORT
The default port for documented URIs.
|
static String |
DEFAULT_SCHEME
The default scheme for documented URIs.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterConfigurerAdded(ConfigurableMockMvcBuilder<?> builder) |
PARENT |
and()
Returns the configurer's parent.
|
RequestPostProcessor |
beforeMockMvcCreated(ConfigurableMockMvcBuilder<?> builder,
WebApplicationContext context) |
UriConfigurer |
withHost(String host)
Configures any documented URIs to use the given
host. |
UriConfigurer |
withPort(int port)
Configures any documented URIs to use the given
port. |
UriConfigurer |
withScheme(String scheme)
Configures any documented URIs to use the given
scheme. |
public static final String DEFAULT_SCHEME
withScheme(String),
Constant Field Valuespublic static final String DEFAULT_HOST
withHost(String),
Constant Field Valuespublic static final int DEFAULT_PORT
withPort(int),
Constant Field Valuespublic UriConfigurer withScheme(String scheme)
scheme. The default is
http.scheme - The URI schemethispublic UriConfigurer withHost(String host)
host. The default is
localhost.host - The URI hostthispublic UriConfigurer withPort(int port)
port. The default is
8080.port - The URI portthispublic PARENT and()
public void afterConfigurerAdded(ConfigurableMockMvcBuilder<?> builder)
afterConfigurerAdded in interface MockMvcConfigurerpublic RequestPostProcessor beforeMockMvcCreated(ConfigurableMockMvcBuilder<?> builder, WebApplicationContext context)
beforeMockMvcCreated in interface MockMvcConfigurer