title: How to get query parameters in a rest controller in a GET request?
body: <p>This should probably be a one-liner, but I am not used to Spring or SpringBoot, and so I'm having troubles.</p>
  
  <p>I am building a RESTful service, with query parameters. For example: <code>http://myweatherapi.com:8080/foo?zip=14325&amp;prop=humidity</code>.</p>
  
  <p>I am trying a SpringBoot's template within which I have this controller:</p>
  
  <pre><code>@RestController
  public class ServiceController {
  
      private static Logger LOG = LoggerFactory.getLogger(ServiceController.class);
  
      @RequestMapping("/foo")
      public String foo(@QueryParam("foo") String foo) {
          requestContextDataService.addNamedParam("foo", foo);
  
          // how can I access the full URL/query params here?
  
          return "Service is alive!!";
      }
  
  }
  </code></pre>
  
  <p>My question is: <em>how can I access the full URL/query parameters</em>?</p>