以下是使用Java响应式WebClient进行text/html响应的GET请求的示例代码: ```java import org.springframework.web.reactive.function.client.WebClient; public class WebClientExample { public static void main(String[] args) { WebClient webClient = WebClient.create("https://example.com"); webClient.get() .uri("/") .retrieve() .bodyToMono(String.class) .subscribe(html -> { System.out.println(html); }); } } ``` 在上面的示例中,我们首先创建了一个WebClient实例,然后使用该实例发出GET请求。我们使用`uri()`方法指定请求的URI,然后使用`retrieve()`方法执行请求并获取响应。最后,我们使用`bodyToMono()`方法将响应主体转换为字符串,并使用`subscribe()`方法订阅响应。在订阅中,我们打印响应的HTML内容。