Class MockMvcRestDocumentationConfigurer
java.lang.Object
org.springframework.restdocs.config.RestDocumentationConfigurer<MockMvcSnippetConfigurer,MockMvcOperationPreprocessorsConfigurer,MockMvcRestDocumentationConfigurer>
org.springframework.restdocs.mockmvc.MockMvcRestDocumentationConfigurer
- All Implemented Interfaces:
org.springframework.test.web.servlet.setup.MockMvcConfigurer
public final class MockMvcRestDocumentationConfigurer
extends RestDocumentationConfigurer<MockMvcSnippetConfigurer,MockMvcOperationPreprocessorsConfigurer,MockMvcRestDocumentationConfigurer>
implements org.springframework.test.web.servlet.setup.MockMvcConfigurer
A MockMvc-specific
RestDocumentationConfigurer
.- Since:
- 1.1.0
- Author:
- Andy Wilkinson, Filip Hrisafov
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterConfigurerAdded
(org.springframework.test.web.servlet.setup.ConfigurableMockMvcBuilder<?> builder) org.springframework.test.web.servlet.request.RequestPostProcessor
beforeMockMvcCreated
(org.springframework.test.web.servlet.setup.ConfigurableMockMvcBuilder<?> builder, org.springframework.web.context.WebApplicationContext context) Returns anOperationPreprocessorsConfigurer
that can be used to configure the operation request and response preprocessors that will be used.snippets()
Returns aSnippetConfigurer
that can be used to configure the snippets that will be generated.uris()
Returns aUriConfigurer
that can be used to configure the request URIs that will be documented.Methods inherited from class org.springframework.restdocs.config.RestDocumentationConfigurer
apply, templateEngine, writerResolver
-
Method Details
-
uris
Returns aUriConfigurer
that can be used to configure the request URIs that will be documented.- Returns:
- the URI configurer
-
beforeMockMvcCreated
public org.springframework.test.web.servlet.request.RequestPostProcessor beforeMockMvcCreated(org.springframework.test.web.servlet.setup.ConfigurableMockMvcBuilder<?> builder, org.springframework.web.context.WebApplicationContext context) - Specified by:
beforeMockMvcCreated
in interfaceorg.springframework.test.web.servlet.setup.MockMvcConfigurer
-
afterConfigurerAdded
public void afterConfigurerAdded(org.springframework.test.web.servlet.setup.ConfigurableMockMvcBuilder<?> builder) - Specified by:
afterConfigurerAdded
in interfaceorg.springframework.test.web.servlet.setup.MockMvcConfigurer
-
snippets
Description copied from class:RestDocumentationConfigurer
Returns aSnippetConfigurer
that can be used to configure the snippets that will be generated.- Specified by:
snippets
in classRestDocumentationConfigurer<MockMvcSnippetConfigurer,
MockMvcOperationPreprocessorsConfigurer, MockMvcRestDocumentationConfigurer> - Returns:
- the snippet configurer
-
operationPreprocessors
Description copied from class:RestDocumentationConfigurer
Returns anOperationPreprocessorsConfigurer
that can be used to configure the operation request and response preprocessors that will be used.- Specified by:
operationPreprocessors
in classRestDocumentationConfigurer<MockMvcSnippetConfigurer,
MockMvcOperationPreprocessorsConfigurer, MockMvcRestDocumentationConfigurer> - Returns:
- the operation preprocessors configurer
-