SpringBoot 控制器接受參數的集中常見方式以及區別

[email protected] @PathVariable 爲路徑參數。即爲url/{param}這種形式。 舉個例子,接口中的參數列表爲這樣的: 接口路徑爲: http://localhost:28080/XXXX/XXXX/detail/1001 加粗的部分即爲參數id。 [email protected] @RequestParam 爲查詢參數。即爲url?param1=?¶m2
相關文章
相關標籤/搜索