List of usage examples for org.springframework.web.bind.annotation RequestMethod DELETE
RequestMethod DELETE
To view the source code for org.springframework.web.bind.annotation RequestMethod DELETE.
Click Source Link
From source file:customer.springboot.controller.CustomerController.java
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE) public void delete(@PathVariable String id) { Customer p = customerDao.findOne(id); if (p != null) { customerDao.delete(p);//from w ww.j a v a 2s .c o m } }
From source file:com.escarabajo.controllers.CardapioController.java
@RequestMapping(method = RequestMethod.DELETE) public ResponseEntity deletecardapio(@PathVariable Long id) { service.delete(id); return ResponseEntity.noContent().build(); }
From source file:es.logongas.encuestas.presentacion.controller.BorrarDatosController.java
@RequestMapping(value = { "/Encuesta" }, method = RequestMethod.DELETE) public void delete(HttpServletRequest httpRequest, HttpServletResponse httpServletResponse) { try {/* w ww .j a va 2 s . c om*/ EncuestaDAO encuestaDAO = (EncuestaDAO) daoFactory.getDAO(Encuesta.class); encuestaDAO.deleteAllData(); noCache(httpServletResponse); httpServletResponse.setStatus(HttpServletResponse.SC_NO_CONTENT); } catch (Exception ex) { httpServletResponse.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); httpServletResponse.setContentType("text/plain"); try { ex.printStackTrace(httpServletResponse.getWriter()); } catch (Exception ex2) { log.error("Fall al imprimir la traza", ex2); } } }
From source file:net.bluemix.connectors.cloudant.StatusRestController.java
@RequestMapping(method = RequestMethod.DELETE, value = "{id}") public void delete(@PathVariable String id) { repo.remove(repo.get(id)); }
From source file:any.shop.web.controller.InvoiceController.java
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE) public void delete(@PathVariable Long id) { invoiceService.delete(id); }
From source file:o2.web.mvc.BookController.java
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE) public void delete(@PathVariable("id") int id, Model model) throws UnsupportedEncodingException { // name = new String(name.getBytes("iso8859-1"), "utf-8"); System.out.println("delte id is " + id); }
From source file:ru.umc806.vmakarenko.controllers.RestController.java
@RequestMapping(value = "lesson", method = RequestMethod.DELETE) public @ResponseBody Result cancelLesson(@RequestParam(value = "id", required = true) String id) { LOG.debug(String.format("rest lesson delete with id = %s", id)); Result result = new Result(); Schedule schedule = new Schedule(); schedule.setId(Integer.parseInt(id)); result.setSuccess(scheduleService.delete(new Filter().setSchedule(schedule))); result.setResult(""); return result; }
From source file:am.ik.categolj2.api.accesslog.AccessLogRestController.java
@RequestMapping(method = RequestMethod.DELETE, params = "remoteAddress", headers = Categolj2Headers.X_ADMIN) public int deleteAccessLogs(@RequestParam("remoteAddress") String remoteAddress) { return accessLogService.deleteFromRemoteAddress(remoteAddress); }
From source file:ip.ip.rest.controller.AuthorRestController.java
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE) public void deleteAuthor(@PathVariable long id) { service.deleteAuthor(id); }
From source file:com.github.hateoas.forms.spring.uber.UberActionTest.java
@Test public void translatesDeleteToRemove() throws Exception { assertEquals(UberAction.REMOVE, UberAction.forRequestMethod(RequestMethod.DELETE)); }