예제 #1
0
 @RequestMapping(value = "/user/listall")
 @ResponseBody
 public ActionResult getUserAll() throws Exception {
   return new ActionResult().setStatus(ActionResult.SUCCESS).setData(userDao.getUserAll());
 }
예제 #2
0
 @RequestMapping(value = "/user/add", method = RequestMethod.POST)
 @ResponseBody
 public ActionResult addUser(User user) throws Exception {
   if (!userDao.getUserAll().contains(user)) userDao.addUser(user);
   return new ActionResult().setStatus(ActionResult.SUCCESS);
 }