Advertisement
Guest User

Untitled

a guest
Oct 12th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. @Path("/app/{resource}") //Suppose resource comes as Apple or Mango.
  2. @Produces(value=MediaType.APPLICATION_JSON)
  3. public class AppResource {
  4.  
  5. @GET
  6. public Response getResource(@PathParam("resource") String resource) {
  7. // Here want to convert resource to Apple or Mango class so that I can create a List<Apple> or List<Mango>.
  8. }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement