Skip to content

Instantly share code, notes, and snippets.

@zarub2k
Last active September 22, 2015 17:56
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 zarub2k/d8d0d3ce8fa187312989 to your computer and use it in GitHub Desktop.
Save zarub2k/d8d0d3ce8fa187312989 to your computer and use it in GitHub Desktop.
package com.cloudskol.restskol.resources;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
@Path("books") [1]
public class BookResource {
@Path("hello") [2]
@GET [3]
@Produces(MediaType.TEXT_PLAIN) [4]
public Response sayHello() {
return Response.ok().entity("Hello, I am a GET Method").build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment