跳到主要内容

测试

ChatGPT-4o 中英对照 Testing

要测试使用 WebClient 的代码,可以使用模拟 web 服务器,例如 OkHttp MockWebServer。要查看其使用示例,请查看 Spring Framework 测试套件中的 WebClientIntegrationTests 或 OkHttp 仓库中的 static-server 示例。