title: spring boot : RequestMapping
body: <p>I have following three REST API methods :</p>
  
  <pre><code>@RequestMapping(value = "/{name1}", method = RequestMethod.GET)
      public Object retrieve(@PathVariable String name1) throws UnsupportedEncodingException {
          return configService.getConfig("frontend", name1);
      }
  
  @RequestMapping(value = "/{name1}/{name2}", method = RequestMethod.GET)
  public Object retrieve(@PathVariable String name1, @PathVariable String name2) throws UnsupportedEncodingException {
      return configService.getConfig("frontend", name1, name2);
  }
  
  @RequestMapping(value = "/{name1}/{name2}/{name3}", method = RequestMethod.GET)
  public Object retrieve(@PathVariable String name1, @PathVariable String name2, @PathVariable String name3) {
      return configService.getConfig("frontend", name1, name2,name3);
  }
  </code></pre>
  
  <p>getConfig method is configured to accept multiple parameters like:</p>
  
  <pre><code> public Object getConfig(String... names) {
  </code></pre>
  
  <p>My Question is : is it possible to achieve the above RequestMapping using only one  method/RequestMapping ?</p>
  
  <p>Thanks.</p>