I am using Jersey Restful webservices. I have below web method to get the results.
@Path("/persons") public class PersonWS { private final static Logger logger = LoggerFactory.getLogger(PersonWS.class); @Autowired private PersonService personService; @GET @Path("/{id}") @Produces({MediaType.APPLICATION_XML}) public Person fetchPerson(@PathParam("id") Integer id) { return personService.fetchPerson(id); } }
Similarly how can i write a webmethod to delete a resource by id ?
Thanks!