Annotation Type AutoConfigureRestDocs
@Target(TYPE) @Retention(RUNTIME) @Documented @Inherited @ImportAutoConfiguration @Import(org.springframework.boot.test.autoconfigure.restdocs.RestDocumentationContextProviderRegistrar.class) @PropertyMapping("spring.test.restdocs") public @interface AutoConfigureRestDocs
Annotation that can be applied to a test class to enable and configure auto-configuration of Spring REST Docs. Allows configuration of the output directory and the host, scheme, and port of generated URIs. When further configuration is required aRestDocsMockMvcConfigurationCustomizerbean can be used.- Since:
- 1.4.0
- See Also:
RestDocsAutoConfiguration,RestDocsMockMvcConfigurationCustomizer
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description StringoutputDirThe output directory to which generated snippets will be written.StringuriHostThe host to be used in documented URIs.inturiPortThe port to be used in documented URIs.StringuriSchemeThe scheme (typicallyhttporhttps) to be used in documented URIs.StringvalueThe output directory to which generated snippets will be written.
Element Detail
value
@AliasFor("outputDir") String valueThe output directory to which generated snippets will be written. An alias foroutputDir().- Returns:
- the output directory
- Default:
- ""
uriPort
int uriPort
The port to be used in documented URIs. Defaults to8080.- Returns:
- the port
- Default:
- 8080