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