Only create a WebTestClient with WebFlux

This commit updates WebTestClientAutoConfiguration to only create a
WebTestClient when running a WebFlux-based application as mocking the
context only works with that mode at the moment.

Closes gh-12318
This commit is contained in:
Stephane Nicoll
2018-03-14 05:12:32 -04:00
parent 5bf4a5fa98
commit b6f9b46be8
4 changed files with 37 additions and 39 deletions

View File

@@ -6532,6 +6532,9 @@ example shows a class that uses both `@WebFluxTest` and a `WebTestClient`:
}
----
TIP: This setup is only supported by WebFlux applications as using `WebTestClient` in a
mocked web application only works with WebFlux at the moment.
A list of the auto-configuration that is enabled by `@WebFluxTest` can be
<<appendix-test-auto-configuration#test-auto-configuration,found in the appendix>>.