@RequestMapping(value = "/myDreamTeams", method = RequestMethod.POST) public String chooseDreamTeam( @RequestParam("pgId") String pgId, @RequestParam("sgId") String sgId, @RequestParam("sfId") String sfId, @RequestParam("pfId") String pfId, @RequestParam("cId") String cId, @RequestParam("teamName") String teamName, Model model) { model.addAttribute( "dreamTeams", dreamTeamService.setDreamTeam(pgId, sgId, sfId, pfId, cId, teamName)); return "myDreamTeams"; }
@RequestMapping(value = "/myDreamTeams", method = RequestMethod.GET) public String myDreamTeams(Model model) { model.addAttribute("dreamTeams", dreamTeamService.getDreamTeams()); return "myDreamTeams"; }