public class UriConfigurer extends AbstractNestedConfigurer<MockMvcRestDocumentationConfigurer> implements org.springframework.test.web.servlet.setup.MockMvcConfigurer
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_HOST
The defalt host for documented URIs.
|
static int |
DEFAULT_PORT
The default port for documented URIs.
|
static java.lang.String |
DEFAULT_SCHEME
The default scheme for documented URIs.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterConfigurerAdded(org.springframework.test.web.servlet.setup.ConfigurableMockMvcBuilder<?> builder) |
void |
apply(java.util.Map<java.lang.String,java.lang.Object> configuration,
RestDocumentationContext context)
Applies the configurer to the given
configuration. |
org.springframework.test.web.servlet.request.RequestPostProcessor |
beforeMockMvcCreated(org.springframework.test.web.servlet.setup.ConfigurableMockMvcBuilder<?> builder,
org.springframework.web.context.WebApplicationContext context) |
UriConfigurer |
withHost(java.lang.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(java.lang.String scheme)
Configures any documented URIs to use the given
scheme. |
andpublic static final java.lang.String DEFAULT_SCHEME
withScheme(String),
Constant Field Valuespublic static final java.lang.String DEFAULT_HOST
withHost(String),
Constant Field Valuespublic static final int DEFAULT_PORT
withPort(int),
Constant Field Valuespublic UriConfigurer withScheme(java.lang.String scheme)
scheme. The default is
http.scheme - The URI schemethispublic UriConfigurer withHost(java.lang.String host)
host. The default is
localhost.host - The URI hostthispublic UriConfigurer withPort(int port)
port. The default is
8080.port - The URI portthispublic void apply(java.util.Map<java.lang.String,java.lang.Object> configuration,
RestDocumentationContext context)
AbstractConfigurerconfiguration.apply in class AbstractConfigurerconfiguration - the configuration to be configuredcontext - the current documentation contextpublic void afterConfigurerAdded(org.springframework.test.web.servlet.setup.ConfigurableMockMvcBuilder<?> builder)
afterConfigurerAdded in interface org.springframework.test.web.servlet.setup.MockMvcConfigurerpublic org.springframework.test.web.servlet.request.RequestPostProcessor beforeMockMvcCreated(org.springframework.test.web.servlet.setup.ConfigurableMockMvcBuilder<?> builder,
org.springframework.web.context.WebApplicationContext context)
beforeMockMvcCreated in interface org.springframework.test.web.servlet.setup.MockMvcConfigurer