/**
* @功能描述:
* 1.@RequestMapping(value={"add","add2"})
* 表示多地址映射,都可以请求的到
* 2.@RequestParam(name = "userName", defaultValue = "张三")
* 表示如果没有传递userName或没有值,则默认值采用"张三"
*/
@RequestMapping(value={"add","add2"})
@ResponseBody
public String add(@RequestParam(name = "userName", defaultValue = "张三") String userName) {
System.out.println("userName = "+ userName);
return userName;
}