@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"; }
@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"; }