I know what @RequestParam
does and what @PathVariable
does on an individual note but my question is when building a URL, when should I go for @RequestParam
and when for @PathVariable
? What are the pros and and cons of using both these annotations?
I did go through this link When to go for @RequestParam and @PathVariable but did not get a satisfactory answer anywhere.