@RequestParm
作用范围:get/post/put/delete即可使用
get/delete请求时获取url中参数,加不加@RequestParam效果一样。
post/put请求时可获取parms中参数以及formdata、x-www-form-urlencoded表单中参数。
且和同时获取parms/formdata或parms/x-www-form-urlencoded中参数,具体值与类型相关。
@RequestBody
作用范围:post/put
post/put请求时可获取body中json、xml参数格式。
@PathVariable
作用范围:get/delete
get/delete请求时获取url中参数内容。
@RequestHeader
作用范围:都可以使用,获取header里面参数内容,中文的话需要先编码后解码。