简单Spring MVC 列子:http://www.blogjava.net/pengo/archive/2010/11/28/339229.html
@controller、@RequestMapping使用说明:
http://starscream.iteye.com/blog/1063966
Spring 返回json列子:
在controller中的方法前面加@ResponseBody就可以了
@RequestMapping(value="test1.htm",method=RequestMethod.GET)
public @ResponseBody Shop getShopInJson(@RequestParam(value="name") String name) {
System.out.println("运行");
Shop shop = new Shop();
shop.setName(name);
shop.setStaffName(new String[]{"mkyong1", "mkyong2"});
return shop;
}
SpringMVC中@ResponseBody的问题
http://www.open-open.com/home/space-124-do-blog-id-3118.html