tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John D. Ament" <johndam...@apache.org>
Subject Re: signify of {} when i create a rest Response with a List
Date Tue, 02 Aug 2016 00:11:21 GMT
GenericEntity is an abstract class.  You're instantiating an anonymous
instance of it.

On Mon, Aug 1, 2016 at 8:06 PM mauro2java2011 <mauro2java2011@gmail.com>
wrote:

> I try to understand how return a collection of object as response with rest
>
>
>
>
> import javax.ws.rs.core.GenericEntity;
> //...
>   @GET
>     public Response workshops() {
>         List<Workshop> workshops = ...//a list of entities
>         GenericEntity<List&lt;Workshop>> l
>         ist = new GenericEntity<List&lt;Workshop>>(workshops) *{}*;
>         return Response.ok(list).build();
>     }
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/signify-of-when-i-create-a-rest-Response-with-a-List-tp4679566.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message