-
-
Save ryctabo/f40c2f8536179e09129cc3fb78c97ba9 to your computer and use it in GitHub Desktop.
My first resource with Jersey
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Path("myresource") | |
public class MyResource { | |
/** | |
* Method handling HTTP GET requests. The returned object will be sent | |
* to the client as "text/plain" media type. | |
* | |
* @return String that will be returned as a text/plain response. | |
*/ | |
@GET | |
@Produces(MediaType.TEXT_PLAIN) | |
public String getIt() { | |
return "Got it!"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment