Skip to content

Instantly share code, notes, and snippets.

@javaeeeee
Created January 24, 2015 08:56
Show Gist options
  • Select an option

  • Save javaeeeee/6aaa3d7f1610154adc6d to your computer and use it in GitHub Desktop.

Select an option

Save javaeeeee/6aaa3d7f1610154adc6d to your computer and use it in GitHub Desktop.
Dropwizard/Jersey sub-resource method using query parameters
@Path("/query_param")
@GET
@Produces(MediaType.TEXT_PLAIN)
public String getNamedStringWithParam(@DefaultValue("world") @QueryParam("name") String name) {
return "Hello " + name;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment