param(@RequestParam("id") int id){
System.out.println("id="+id);
ModelAndView view = new ModelAndView(PAGE);
view.addObject("id",id);
@RequestParam require=false default=0
-------------------------------
@RequestMapping("/param")
public ModelAndView param(@RequestParam(value = "id",defaultValue = "0") int id,
@RequestParam(value = "type",required = false,defaultValue = "") String type){
if(null!=type&&type.equals("苹果")){
}
System.out.println("id="+id);
System.out.println("type="+type);
ModelAndView view = new ModelAndView(PAGE);
view.addObject("id",id);
return view;
}