예제 #1
0
  @RequestMapping(value = "/edit", method = RequestMethod.POST)
  public String edit(@ModelAttribute User user) {
    System.out.println("user = "******"redirect:/";
  }
예제 #2
0
 @RequestMapping(value = "/list", method = RequestMethod.GET)
 public String list(
     Model model,
     @RequestParam(required = false) String name,
     @RequestParam(required = false) String email,
     @RequestParam(required = false) String order) {
   Searchable searchable = new Searchable();
   searchable.setName(name);
   searchable.setEmail(email);
   searchable.setOrderParam(order);
   model.addAttribute("users", userMapper.findByProvider(searchable));
   // model.addAttribute("users", userMapper.findByScript(searchable));
   return "list";
 }
예제 #3
0
 @RequestMapping(value = "/edit", method = RequestMethod.GET)
 public String edit(@RequestParam int id, Model model) {
   model.addAttribute("user", userMapper.findOne(id));
   return "edit";
 }