@PathVariable @RequestParam使用
@RequestParam,接收get或者post方式的前端参数。如果前端传递的参数和后端你接受的参数的字段名称是一致的可以省略不写,也可以直接写@RequestParam String id,如下面的接收前端传过来的id。这种情况参数不会拼接在URL上面。
@GetMapping("xxx/xxx")
public RequestResult get(
...
原创
2019-12-18 16:50:28 ·
317 阅读 ·
0 评论