Returning a stream from a Spring REST Controller
<p>I am curios if it is possible to return a <code>Stream</code> from a Spring <code>RestController</code></p>

<pre><code>@RestController
public class X {
  @RequestMapping(...)
  public Stream&lt;?&gt; getAll() { ... }
}
</code></pre>

<p>Is it ok to do something like this? I tried and Spring returns something else other than the values of a stream.</p>

<p>Shall I keep returning a <code>List&lt;?&gt;</code>?</p>