How to use AsyncRestTemplate to make multiple calls simultaneously?
<p>I don't understand how to use <code>AsyncRestTemplate</code> effectively for making external service calls. For the code below:</p>

<pre><code>class Foo {

    public void doStuff() {
        Future&lt;ResponseEntity&lt;String&gt;&gt; future1 = asyncRestTemplate.getForEntity(
                url1, String.class);
        String response1 = future1.get();

        Future&lt;ResponseEntity&lt;String&gt;&gt; future2 = asyncRestTemplate.getForEntity(
                url2, String.class);
        String response2 = future2.get();

        Future&lt;ResponseEntity&lt;String&gt;&gt; future3 = asyncRestTemplate.getForEntity(
                url3, String.class);
        String response3 = future3.get();
    }
}
</code></pre>

<p>Ideally I want to execute all 3 calls simultaneously and process the results once they're all done. <strong><em>However</em></strong> each external service call is <strong>not</strong> fetched until <code>get()</code> is called but <code>get()</code> is blocked. So doesn't that defeat the purpose of <code>AsyncRestTemplate</code>? I might as well use <code>RestTemplate</code>.</p>

<p>So I don't understaand how I can get them to execute simultaneously?</p>