spring - DeferredResult Empty Body -


i've seen this, having issue now.

if change controller return responseentity<?> body comes through fine, if returns deferredresult<responseentity<?>> headers , status code no response body.

any appreciated

use of deferredresult not matter of changing controller's response type. controller returns deferredresult delegate handling of request thread pool (or async mechanism) , whatever performs request must set response on deferredresult. this:

in controller:

deferredresult deferredresult = new deferredresult<>();  // pass deferredresult runnable task (or similar)  // scheduled execution via thread pool (or similar)  return deferredresult; 

in task executes request on behalf of controller:

// work // ... deferredresult.setresponse(responsebody); 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -