Created
November 20, 2019 12:32
-
-
Save akoserwal/41e484df187bcf219a21d2abf05092c5 to your computer and use it in GitHub Desktop.
UserResource
This file contains hidden or 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("/user") | |
| @Authenticated | |
| @Produces(MediaType.APPLICATION_JSON) | |
| @Consumes(MediaType.APPLICATION_JSON) | |
| public class UserResource { | |
| private final User user; | |
| public UserResource() { | |
| user = new User(); | |
| user.setEmail("[email protected]"); | |
| user.setName("abhishek"); | |
| } | |
| @GET | |
| public Response user(){ | |
| return Response.ok(user).build(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment