Required request parameter ‘name‘ for method parameter type String is not present 报错解决方法
注解 | 支持的类型 | 支持的请求类型 | 支持的 Content-Type | 请求示例 |
---|---|---|---|---|
@PathVariable | url | GET | 所有 | /test/{id} |
@RequestParam | url | GET | 所有 | /test?id=1 |
@RequestBody | Body | POST/PUT/DELETE/PATCH | json | { "id" : 1 } |