@RequestParam、@RequestBody和@ModelAttribute区别
一、@RequestParam
GET和POST请求传的参数会自动转换赋值到@RequestParam 所注解的变量上
1. @RequestParam(org.springframework.web.bind.annotation.RequestParam)用于将指定的请求参数赋值给方法中的形参。
例:
(1) get请求:
url请求:http://localhost:8080/WxProg...
原创
2019-03-13 10:43:38 ·
467 阅读 ·
0 评论