Issue
I have an sync endpoint defined as follows:
@PostMapping("/some/url/")
@ResponseBody
public Future<String> something(...) {
... do stuff ...
}
When the returned Future
is not completed after 30 seconds the request is cancelled.
How can I increase the timeout for this specific endpoint (e.g. to 100 seconds)?
I only found answers for changing it for all endpoins:
Solution
You can return WebAsyncTask that supports timeout.
From docs: For a Callable, you can use WebAsyncTask to provide a timeout value
Answered By - cdalxndr
Answer Checked By - Robin (JavaFixing Admin)