@Test public void testAccount() throws Exception { }
@RequestMapping("account") public String account(Model model, Principal principal) { String userName = principal.getName(); model.addAttribute("blog", new RssFeedEntity()); model.addAttribute("user", userService.findOneWithAllBlogs(userName)); return "account"; }
UserController { @RequestMapping("account") public String account(Model model, Principal principal) { String userName = principal.getName(); model.addAttribute("blog", new RssFeedEntity()); model.addAttribute("user", userService.findOneWithAllBlogs(userName)); return "account"; } }
UserController { @RequestMapping("account") public String account(Model model, Principal principal) { String userName = principal.getName(); model.addAttribute("blog", new RssFeedEntity()); model.addAttribute("user", userService.findOneWithAllBlogs(userName)); return "account"; } @Autowired  UserController(IUserService userService, IRssFeedService blogService); }
UserController { @RequestMapping("account") public String account(Model model, Principal principal) { String userName = principal.getName(); model.addAttribute("blog", new RssFeedEntity()); model.addAttribute("user", userService.findOneWithAllBlogs(userName)); return "account"; } @Autowired  UserController(IUserService userService, IRssFeedService blogService); @RequestMapping("account") String account(Model model, Principal principal); @RequestMapping(value = "account", method = RequestMethod.POST) String doAddBlog(@Valid @ModelAttribute("blog") RssFeedEntity rssFeedEntity, Model model,
                            Principal principal, BindingResult result); @RequestMapping(value = "blog/remove/{id}") String removeBlog(@PathVariable Long id); }
UserController { @RequestMapping("account") public String account(Model model, Principal principal) { String userName = principal.getName(); model.addAttribute("blog", new RssFeedEntity()); model.addAttribute("user", userService.findOneWithAllBlogs(userName)); return "account"; } @Autowired  UserController(IUserService userService, IRssFeedService blogService); @RequestMapping("account") String account(Model model, Principal principal); @RequestMapping(value = "account", method = RequestMethod.POST) String doAddBlog(@Valid @ModelAttribute("blog") RssFeedEntity rssFeedEntity, Model model,
                            Principal principal, BindingResult result); @RequestMapping(value = "blog/remove/{id}") String removeBlog(@PathVariable Long id);  }