Skip to content

Instantly share code, notes, and snippets.

@akoserwal
Created November 20, 2019 12:32
Show Gist options
  • Save akoserwal/41e484df187bcf219a21d2abf05092c5 to your computer and use it in GitHub Desktop.
Save akoserwal/41e484df187bcf219a21d2abf05092c5 to your computer and use it in GitHub Desktop.
UserResource
@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