How can I overload a method with @QueryParam in Jersey/Spring?
问题 I would like to overload a method with the @QueryParam but everytime I try to execute this code it throws: SEVERE: Exception occurred when intialization com.sun.jersey.spi.inject.Errors$ErrorMessagesException My code is: @GET @Path("/test") @Produces("text/plain") public String getText(@QueryParam("PID") String pid) { return pid; } @GET @Path("/test") @Produces("text/plain") public String getText(@QueryParam("PID") String pid, @QueryParam("NAME") String name) { return pid + name; } 回答1: No