Tag: pathvariable

  • How to retrieve URL and Query parameters in Spring Boot?

    Let’s say you want to create a Spring Boot REST API which accepts URL and query parameters. How do you retrieve those parameters in the code ? By using @RequestParam annotation for query parameter @PathVariable annotation for URL parameter Here is an example: The above method is a GET REST service which takes in a…