Beispiel #1
0
 @RequestMapping(value = "/{id}", method = RequestMethod.GET)
 @ResponseBody
 public UIPing getById(@PathVariable Long id) {
   return pingService.getById(id);
 }
Beispiel #2
0
 /* same as above method, but is mapped to
  * /api/person?id= rather than /api/person/{id}
  */
 @RequestMapping(params = "id", method = RequestMethod.GET)
 @ResponseBody
 public UIPing getByIdFromParam(@RequestParam("id") Long id) {
   return pingService.getById(id);
 }
Beispiel #3
0
 @RequestMapping(value = "/random", method = RequestMethod.GET)
 @ResponseBody
 public UIPing randomPerson() {
   return pingService.getRandom();
 }