其他分享
首页 > 其他分享> > 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);
    }

标签:quick5,RequestParam,SpringMVC,绑定,System,value,false
来源: https://blog.csdn.net/NJUSTZJC/article/details/122262077