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 26d9c261c5
commit 282bd9f0db
4 changed files with 37 additions and 39 deletions

View File

@@ -6520,6 +6520,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>>.