Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhirockzz/95ed03c507476ffa856a to your computer and use it in GitHub Desktop.
Save abhirockzz/95ed03c507476ffa856a to your computer and use it in GitHub Desktop.
Hypothetical Movies resource
@Path("movies")
public class Books{
@Produces("application/json")
@GET
public List<Movie> findAll(){
//find all movies e.g. /movies/
}
@Produces("application/json")
@GET
@Path("{name}")
public Movie findById(@PathParam("name") String name){
//find movie by name e.g. /movies/SourceCode
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment