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 TypeMethodDescriptionvoidafterConfigurerAdded(org.springframework.test.web.servlet.setup.ConfigurableMockMvcBuilder<?> builder) org.springframework.test.web.servlet.request.RequestPostProcessorbeforeMockMvcCreated(org.springframework.test.web.servlet.setup.ConfigurableMockMvcBuilder<?> builder, org.springframework.web.context.WebApplicationContext context) Returns anOperationPreprocessorsConfigurerthat can be used to configure the operation request and response preprocessors that will be used.snippets()Returns aSnippetConfigurerthat can be used to configure the snippets that will be generated.uris()Returns aUriConfigurerthat 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 aUriConfigurerthat 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:
beforeMockMvcCreatedin interfaceorg.springframework.test.web.servlet.setup.MockMvcConfigurer
-
afterConfigurerAdded
public void afterConfigurerAdded(org.springframework.test.web.servlet.setup.ConfigurableMockMvcBuilder<?> builder) - Specified by:
afterConfigurerAddedin interfaceorg.springframework.test.web.servlet.setup.MockMvcConfigurer
-
snippets
Description copied from class:RestDocumentationConfigurerReturns aSnippetConfigurerthat can be used to configure the snippets that will be generated.- Specified by:
snippetsin classRestDocumentationConfigurer<MockMvcSnippetConfigurer,MockMvcOperationPreprocessorsConfigurer, MockMvcRestDocumentationConfigurer> - Returns:
- the snippet configurer
-
operationPreprocessors
Description copied from class:RestDocumentationConfigurerReturns anOperationPreprocessorsConfigurerthat can be used to configure the operation request and response preprocessors that will be used.- Specified by:
operationPreprocessorsin classRestDocumentationConfigurer<MockMvcSnippetConfigurer,MockMvcOperationPreprocessorsConfigurer, MockMvcRestDocumentationConfigurer> - Returns:
- the operation preprocessors configurer
-