Question: what is the difference between requestparam and pathvariable?
Answer: 1) The @RequestParam is used to extract query parameters while @PathVariable is used to extract data right from the URI. ... Even though both are used to extract data from URL, @RequestParam is used to retrieve query parameters, anything after ? in the URL, while @PathVariable is used to retrieve values from URI itself.