List of usage examples for org.springframework.web.bind.annotation RequestMethod POST
RequestMethod POST
To view the source code for org.springframework.web.bind.annotation RequestMethod POST.
Click Source Link
From source file:za.co.dwarfsun.jcmanager.presentation.rest.JobDataRestController.java
@RequestMapping(value = "create", method = RequestMethod.POST) @ResponseBody//from w w w.ja v a 2s . c o m public String create(@RequestBody JobData jobData) { jobDataService.persist(jobData); return "JobData: " + jobData.getId() + " created..."; }
From source file:za.co.dwarfsun.jcmanager.presentation.rest.JobInfoRestController.java
@RequestMapping(value = "create", method = RequestMethod.POST) @ResponseBody/*from ww w.j a v a 2 s .c o m*/ public String create(@RequestBody JobInfo jobInfo) { jobInfoService.persist(jobInfo); return "JobInfo: " + jobInfo.getId() + " created..."; }
From source file:com.xinferin.controller.ActivationController.java
@RequestMapping(value = "/activate", method = RequestMethod.POST, consumes = "application/json") @ResponseStatus(HttpStatus.CREATED)/*from w ww. j a va 2s . c o m*/ public void activate(@RequestBody Activation activation) { daoActivation.add(activation); }
From source file:com.ibm.cf.ManifestController.java
@RequestMapping(value = "/generate", method = RequestMethod.POST) public String generator(@RequestBody Manifest manifest, HttpServletResponse response) { return manifest.toString(); }
From source file:com.faces.controller.CaptureController.java
@RequestMapping(value = "/save/snapshot", method = RequestMethod.POST) public ModelAndView saveSnapshot(@RequestParam(value = "sam", required = false) String sam) { System.out.println("....................rollNumber = " + sam); mav = new ModelAndView("upload"); return mav;/* ww w . j av a 2 s .com*/ }
From source file:com.taobao.diamond.server.controller.LoginController.java
@RequestMapping(params = "method=login", method = RequestMethod.POST) public String login(HttpServletRequest request, @RequestParam("username") String username, @RequestParam("password") String password, ModelMap modelMap) { if (adminService.login(username, password)) { request.getSession().setAttribute("user", username); return "admin/admin"; } else {// w w w .j av a 2 s . c o m modelMap.addAttribute("message", ""); return "login"; } }
From source file:com.cemeterylistingsweb.presentation.rest.PublishedDeceasedListingController.java
@RequestMapping(value = "create", method = RequestMethod.POST) // This the uri e.g http://localhost:8084/askweb/api/club/create @ResponseBody //Converts output or response to JSON String public String create(@RequestBody PublishedDeceasedListing pdl) { // @RequestBody for converting incoming JSON call to Object ps.persist(pdl);//from ww w. ja va 2 s .co m System.out.println(" Create the Called "); return "decesed listing created"; }
From source file:com.healthcit.cacure.web.controller.FormElementBatchDeleteController.java
@RequestMapping(value = "/questionList.delete", method = RequestMethod.POST) public ResponseEntity<String> batchDelete(@RequestParam(value = "feIds[]", required = false) Long[] feIds) { HashSet<Long> uniqueIds = new HashSet<Long>(Arrays.asList(feIds)); Set<Long> deleted = new HashSet<Long>(); for (Long id : uniqueIds) { try {/* ww w. j av a2s.c o m*/ qaManager.deleteFormElementByID(id); deleted.add(id); } catch (Exception e) { e.printStackTrace(); } } JSONArray jsonArray = new JSONArray(); for (Long id : deleted) { jsonArray.add(id); } HttpHeaders headers = new HttpHeaders(); headers.add("Content-Type", "application/json"); return new ResponseEntity<String>(jsonArray.toString(), headers, HttpStatus.OK); }
From source file:com.ace.erp.controller.sys.UserController.java
@RequestMapping(value = "/", method = RequestMethod.POST) public String viewPerfectInfo(User user, Model model) { return "/perfectInfo"; }
From source file:runtheshow.resource.webservice.EventService.java
@RequestMapping(value = "/add", method = RequestMethod.POST, consumes = "application/json; charset=UTF-8") public Boolean addEvent(Principal user, @RequestBody Evenement event, HttpServletResponse response) { return metier.addEvent(user, event); }