Ejemplo n.º 1
0
 @RequestMapping(value = "/{id}", method = RequestMethod.GET, produces = "application/json")
 public @ResponseBody User lookupMemberById(@PathVariable("id") int id) {
   return userDao.findById(id);
 }
Ejemplo n.º 2
0
 @RequestMapping(method = RequestMethod.GET, produces = "application/json")
 public @ResponseBody List<User> listAllMembers() {
   return userDao.findAllOrderedByName();
 }