@GET // entre chaves( { } ) significa que é um parametro @Path("/{id_heroi}") @Produces("application/json") public HeroiJson getHeroiByID(@PathParam("id_heroi") int id) { return heroiSingleton.getHeroibyId(id); }
// Add business logic below. (Right-click in editor and choose // "Insert Code > Add Business Method") @GET // entre chaves( { } ) significa que é um parametro @Path("/lista") @Produces("application/json") public List<HeroiJson> getListHeroi() { return heroiSingleton.getListHeroi(); }