@ResponseBody
	@RequestMapping("/insertmatch.do")
	public String insertMatch() {
		String output = null;
		HttpClient client = new DefaultHttpClient();
		HttpGet request = new HttpGet(matches);
		HttpResponse response = null;
		try {
			response = client.execute(request);
			int statusCode = response.getStatusLine().getStatusCode();
			if (statusCode != HttpStatus.SC_OK) {
				output = "error";
				return output;
			}
			InputStream input = response.getEntity().getContent();
			String content = IOUtils.toString(input);
			System.out.println(content);
			MatchHandler handler = new MatchHandler();
			XMLReader reader = XMLReaderFactory.createXMLReader();
			reader.setContentHandler(handler);
			// reader.parse(content);
			reader.parse(new InputSource(new StringReader(content)));
			List<Match> matches = handler.getMatches();
			for (int i = 0; i < matches.size(); i++) {
				Match match = matches.get(i);
				System.out.println(match.toString());
				Match selectMatch = matchMapper.selectMatch(match.getMatchid());
				if (selectMatch == null) {
					matchMapper.insertMatch(match);
				} else {
					System.out.println("比赛已存在:" + match.toString());
				}

			}
		} catch (ClientProtocolException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SAXException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return "success";
	}