public class RestDocumentationMockMvcConfigurer extends MockMvcConfigurerAdapter
MockMvcConfigurer that can be used to configure the documentation.
In the absence of any customization the following snippets will be
produced by default:
In the absence of any customization, documented URIs have the following
defaults:
httplocalhost8080ConfigurableMockMvcBuilder.apply(MockMvcConfigurer),
MockMvcRestDocumentation.documentationConfiguration(RestDocumentation)| Modifier and Type | Method and Description |
|---|---|
RequestPostProcessor |
beforeMockMvcCreated(ConfigurableMockMvcBuilder<?> builder,
WebApplicationContext context) |
SnippetConfigurer |
snippets()
Returns a
SnippetConfigurer that can be used to configure the snippets that
will be generated. |
RestDocumentationMockMvcConfigurer |
templateEngine(TemplateEngine templateEngine)
Configures the
TemplateEngine that will be used for snippet rendering. |
UriConfigurer |
uris()
Returns a
UriConfigurer that can be used to configure the request URIs that
will be documented. |
RestDocumentationMockMvcConfigurer |
writerResolver(WriterResolver writerResolver)
Configures the
WriterResolver that will be used to resolve a writer for a
snippet. |
afterConfigurerAddedpublic UriConfigurer uris()
UriConfigurer that can be used to configure the request URIs that
will be documented.public SnippetConfigurer snippets()
SnippetConfigurer that can be used to configure the snippets that
will be generated.public RestDocumentationMockMvcConfigurer templateEngine(TemplateEngine templateEngine)
TemplateEngine that will be used for snippet rendering.templateEngine - the template engine to usethispublic RestDocumentationMockMvcConfigurer writerResolver(WriterResolver writerResolver)
WriterResolver that will be used to resolve a writer for a
snippet.writerResolver - The writer resolver to usethispublic RequestPostProcessor beforeMockMvcCreated(ConfigurableMockMvcBuilder<?> builder, WebApplicationContext context)
beforeMockMvcCreated in interface MockMvcConfigurerbeforeMockMvcCreated in class MockMvcConfigurerAdapter