Closed as not planned
Description
Affects: Spring Boot 3.0.5 / Spring Framework 6.0.7
As mentioned in the title, it seems the webclient timeout value does not work when using the HTTP interface.
But the same timeout value works when using the webclient directly as below.
@EventListener
public void onStartup(ApplicationStartedEvent event) {
// Non-blocking, working fine
event.getApplicationContext().getBean(WebClient.class)
.get()
.uri("http://localhost:8080/test")
.retrieve().bodyToMono(String.class)
.subscribe(System.out::println);
// Blocking, working fine
String result = event.getApplicationContext().getBean(WebClient.class)
.get()
.uri("http://localhost:8080/test")
.retrieve().bodyToMono(String.class)
.block();
System.out.println(result);
// Blocking but with HttpInterface, is failing
SampleApi sampleApi = event.getApplicationContext().getBean(SampleApi.class);
System.out.println(sampleApi.get().getStatusCode());
}
I have added a minimal sample application that demonstrates the above issue.
https://github.com/pmverma/demo-http-interface-webclient-timeout
All codes are in a single file DemoHttpInterfaceWebclientTimeoutApplication.java
Regards,
Mohan