public class RestDocumentationMockMvcConfigurer extends MockMvcConfigurerAdapter
MockMvcConfigurer
that can be used to configure the documentationConfigurableMockMvcBuilder.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. |
afterConfigurerAdded
public 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 usethis
public RestDocumentationMockMvcConfigurer writerResolver(WriterResolver writerResolver)
WriterResolver
that will be used to resolve a writer for a
snippet.writerResolver
- The writer resolver to usethis
public RequestPostProcessor beforeMockMvcCreated(ConfigurableMockMvcBuilder<?> builder, WebApplicationContext context)
beforeMockMvcCreated
in interface MockMvcConfigurer
beforeMockMvcCreated
in class MockMvcConfigurerAdapter