springmvc03

请求参数的绑定



我们如果写
<a href="param/testParam?username=hehe">请求参数绑定</a>
那么在
@RequestMapping("/testParam") public String testParam(String username) {
    System.out.println("执行了..."); return "success";
}
参数就会自动赋给username。
传多个参数
<a href="param/testParam?username=hehe&password=123">请求参数绑定</a>

全部评论

相关推荐

下北澤大天使:你是我见过最美的牛客女孩😍
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务