Use of @PathVariable() parameter passing annotation
(Receive parameters of type Long and type String ) Example:
@RestController
@RequestMapping("/api")
public class Controller {
@Autowired
private IUserService userService;
@PostMapping("/getlist/{id}/{name}")
private AjaxResult getlist(@PathVariable("id") Long id,
@PathVariable("name") String name) {
List<user> list= userService.getlist(id, name);
return AjaxResult.success(list);
}
}