1
は、私は次の記事を見つけた:Spring MVCの3.2プレビュー:サーブレット3をご紹介し、非同期サポートspring mvcでの結果のタイムアウトの使用方法は?
例:
@RequestMapping("/quotes")
@ResponseBody
public DeferredResult<String> quotes() {
DeferredResult<String> deferredResult = new DeferredResult<String>();
// Add deferredResult to a Queue or a Map...
return deferredResult;
}
// In some other thread... <-- important phrase
deferredResult.setResult(data);
// Remove deferredResult from the Queue or Map
しかし、結果は1分以内に設定されていなかった場合、私は場合に必要 - あるべきエラーresul戻ってきた。
私の要件に応じてこの例を変更するにはどうすればよいですか?