Skip to content

Add Support to CompletableFuture as return type in http service method. #35090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

remeio
Copy link
Contributor

@remeio remeio commented Jun 21, 2025

To fix the issue #34748, I had added the support to CompletableFuture as return type in http service method like this:

@GetExchange
CompletableFuture<XXX> asyncRequest();

@GetExchange
CompletableFuture<Optional<XXX>> asyncRequestOptional();

It is worth mentioning that I have not yet supported setting Executor of CompletableFuture. Can anyone give some advice?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged or decided on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants