Exemple #1
0
 @RequestMapping("/self/item/new")
 public String newItem(Model model, HttpServletRequest request, HttpServletResponse response)
     throws Exception {
   User user = getCurrentUser();
   List<City> citys = cityMng.findAll();
   List<Category> categorys = categoryMng.findAll();
   model.addAttribute("citys", citys);
   model.addAttribute("categorys", categorys);
   model.addAttribute("user", user);
   return "self/item";
 }
Exemple #2
0
  @RequestMapping("/self/profile")
  public String profile(Model model, HttpServletRequest request, HttpServletResponse response)
      throws Exception {

    User user = getCurrentUser();
    user = userMng.findById(user.getUserId());
    List<City> citys = cityMng.findAll();
    model.addAttribute("citys", citys);
    model.addAttribute("userId", user.getUserId());
    model.addAttribute("user", user);
    return "self/profile";
  }