Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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