小编sri*_*dya的帖子

@PathVariable、@RequestParam 和 @RequestBody 之间的区别

我了解Spring 中@PathVariable,@RequestParam和 的@RequestBody作用,但不清楚我们必须在哪些场景中使用它们,因为它们用于从 URI 中提取值。为什么我们必须发送像 localhost:8080/getBooks/time 和 localhost:8080/getBooks?book=time 这样的数据。

java rest spring spring-boot restapi

1
推荐指数
2
解决办法
182
查看次数

标签 统计

java ×1

rest ×1

restapi ×1

spring ×1

spring-boot ×1