I would like to call my Webservice with this pattern :
/resource/1,2,3
And in my Class I want to bind my parameters to a List of Object
@Path("/resource")
public class AppWS {
@GET
@Path("/{params}")
public Response get(@PathParam("params") List<MyObject> params) {
return Response.status(200).entity("output").build();
}
}
With a simple Object:
public class MyObject {
Integer value;
public MyObject(Integer value) {
this.value = value;
}
}
nb: If it possible I don't want to create an MyObjectList which extends List (and have a constructor which split my string)
How may I proceed ?
I'm not sure the way of
1,2,3
.If you insist,
If you really insist,
annotation,
converter,
provider,
Now you can use it like this.