SpringMVC中参数绑定注解@RequestParam

SpringMVC中参数绑定注解@RequestParam



SpringMVC中参数绑定注解@RequestParam

例子:

    @RequestMapping(value = "/quick5")
    @ResponseBody
    public void quick5(@RequestParam(value = "name",required = false,defaultValue = "dafault") String username , @RequestParam(value = "nianlin",required = false,defaultValue = "dafault")int age){
        System.out.println(username);
        System.out.println(age);
    }
上一篇:SpringMVC-----获取请求参数


下一篇:SpringMVC的学习