-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed as not planned
Closed as not planned
Copy link
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertype: enhancementA general enhancementA general enhancement
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
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertype: enhancementA general enhancementA general enhancement