WebFlux with Explicit Mode
在生成的测试中,您还可以在显式模式下使用 WebFlux,以便与 WebFlux 配合使用。以下示例演示了如何使用显式模式进行配置:
You can also use WebFlux with the explicit mode in your generated tests to work with WebFlux. The following example shows how to configure using explicit mode:
Maven
<plugin>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-maven-plugin</artifactId>
<version>${spring-cloud-contract.version}</version>
<extensions>true</extensions>
<configuration>
<testMode>EXPLICIT</testMode>
</configuration>
</plugin>
Gradle
contracts {
testMode = 'EXPLICIT'
}
下面的 {samples_url}/producer_webflux/[example] 中演示了如何为 Web Flux 设置基本类别和 RestAssured。
The following {samples_url}/producer_webflux/[example] shows how to set up a base class and RestAssured for Web Flux.