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