@RequestMapping(value = "/toSearch.do", method = RequestMethod.POST)
  public @ResponseBody List<MatchInfo> toSearch(
      @RequestParam("match_date") String match_date,
      @RequestParam("hm_name") String hm_name,
      @RequestParam("aw_name") String aw_name,
      @RequestParam("hm_conference") String hm_conference,
      @RequestParam("hm_division") String hm_division,
      @RequestParam("aw_conference") String aw_conference,
      @RequestParam("aw_division") String aw_division,
      @RequestParam("winner") String winner) {

    ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
    MatchInfoDao dao = (MatchInfoDao) context.getBean("matchInfoDao");
    List<MatchInfo> infoList =
        dao.doSearch(
            match_date,
            hm_name,
            aw_name,
            hm_conference,
            hm_division,
            aw_conference,
            aw_division,
            winner);

    return infoList;
  }
  @RequestMapping("/toMatchInfo.do")
  public String toMatchInfo(Model model) {
    ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
    MatchInfoDao dao = (MatchInfoDao) context.getBean("matchInfoDao");
    List<MatchInfo> infoList = dao.doShow();
    model.addAttribute("list", infoList);

    return "success";
  }
  @RequestMapping(value = "/toQueryReview.do", method = RequestMethod.GET)
  public @ResponseBody Map<String, Object> toQueryReview(@RequestParam("matchid") int matchid) {

    ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
    MatchInfoDao dao = (MatchInfoDao) context.getBean("matchInfoDao");
    Map<String, Object> matchReview = dao.getMatchReview(matchid);

    return matchReview;
  }
  @RequestMapping(value = "/toLoadMatchInfoAndFeature.do", method = RequestMethod.GET)
  public @ResponseBody InfoAndFeature toLoadMatchInfoAndFeature(
      @RequestParam("matchid") int matchid) {

    ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
    MatchInfoDao dao = (MatchInfoDao) context.getBean("matchInfoDao");
    InfoAndFeature infoAndFeature = dao.loadMatchInfoAndFeature(matchid);

    return infoAndFeature;
  }