예제 #1
0
 @RequestMapping(value = "/{id}", method = RequestMethod.GET, produces = "application/json")
 public @ResponseBody Member lookupMemberById(@PathVariable("id") Long id) {
   return memberDao.findById(id);
 }
예제 #2
0
 @RequestMapping(method = RequestMethod.GET, produces = "application/json")
 public @ResponseBody List<Member> listAllMembers() {
   return memberDao.findAllOrderedByName();
 }