47484950515253
} @RequestMapping(value = "/add", method = HttpMethod.POST) public View add(HttpServletRequest request, HttpServletResponse response) { System.out.println("into /add"); return new TextView(request.getParameter("content")); }
53545556575859
} @RequestMapping(value = "/add2", method = HttpMethod.POST) public View add2(HttpServletRequest request, HttpServletResponse response) { System.out.println("into /add2"); return new TextView("test add 2"); }
123124125126127128129
} @RequestMapping(value = "/param") public View testParam(HttpServletRequest request) { Map<String, String[]> map = request.getParameterMap(); return new TextView(Arrays.toString(map.get("b"))); }
142143144145146147148
} catch (IOException e) { e.printStackTrace(); } String ret = json.toString(); Thread.sleep(5000); return new TextView(ret); }
164165166167168169170
} else { part.write( "/Users/qiupengtao/fireflyTest/" + part.getName() + ".txt" ); } } // throw new RuntimeException("upload error"); return new TextView("upload ok!"); }
27282930313233
} @RequestMapping(value = "/hello/text") public View text(HttpServletRequest request) { log.info("into text output >>>>>>>>>>>>>>>>>"); return new TextView("文本输出"); }
32333435363738
return new TextView("文本输出"); } @RequestMapping(value = "/hello/text-?/?-?") public View text2(HttpServletRequest request, @PathVariable String[] args) { return new TextView("text-" + args[0] + "-" + args[1] + "-" + args[2]); }
37383940414243
return new TextView("text-" + args[0] + "-" + args[1] + "-" + args[2]); } @RequestMapping(value = "/hello?") public View text3(HttpServletRequest request, @PathVariable String[] args) { return new TextView("text-" + args[0]); }