Merge branch '2.2.x' into 2.3.x

Closes gh-22669
This commit is contained in:
Andy Wilkinson
2020-07-30 12:12:45 +01:00
2 changed files with 15 additions and 6 deletions

View File

@@ -7206,7 +7206,7 @@ It can also be used to configure the host, scheme, and port that appears in any
[[boot-features-testing-spring-boot-applications-testing-autoconfigured-rest-docs-mock-mvc]]
===== Auto-configured Spring REST Docs Tests with Mock MVC
`@AutoConfigureRestDocs` customizes the `MockMvc` bean to use Spring REST Docs.
`@AutoConfigureRestDocs` customizes the `MockMvc` bean to use Spring REST Docs when testing Servlet-based web applications.
You can inject it by using `@Autowired` and use it in your tests as you normally would when using Mock MVC and Spring REST Docs, as shown in the following example:
[source,java,indent=0]
@@ -7276,7 +7276,7 @@ The following example shows a `RestDocumentationResultHandler` being defined:
[[boot-features-testing-spring-boot-applications-testing-autoconfigured-rest-docs-web-test-client]]
===== Auto-configured Spring REST Docs Tests with WebTestClient
`@AutoConfigureRestDocs` can also be used with `WebTestClient`.
`@AutoConfigureRestDocs` can also be used with `WebTestClient` when testing reactive web applications.
You can inject it by using `@Autowired` and use it in your tests as you normally would when using `@WebFluxTest` and Spring REST Docs, as shown in the following example:
[source,java,indent=0]