users@jersey.java.net

[Jersey] Re: Adding grammar to the resources

From: Nick Khamis <symack_at_gmail.com>
Date: Mon, 29 Jul 2013 20:58:28 -0400

When I remove the @Path, I am getting the following error:

These two methods produces and consumes exactly the same mime-types and
therefore their invocation as a resource methods will always fail.

I have:

@Path("/wines")
public class WineResource

@GET
@Produces({MediaType.APPLICATION_JSON})
public List<Wine> findAll()

@GET
@Produces({MediaType.APPLICATION_JSON})
public List<Wine> findByName(@QueryParam("name") String name)

@GET
@Produces({MediaType.APPLICATION_JSON})
public Wine findById(@QueryParam("id") String id)

Thanks in Advance,

Nick.