1
JavaIntermediate#spring
@RequestParam extracts query string parameters, @PathVariable extracts values embedded in the URL path, and @RequestBody deserializes the HTTP request body (typically JSON) into a Java object.
@GetMapping("/users/{id}")
User getUser(@PathVariable Long id, @RequestParam(required=false) String filter) { ... }
@PostMapping("/users")
User create(@RequestBody User user) { ... }