title: How to use request and path parameters in a Spring Boot REST controller?
body: <p>I have the following upload controller which has two params with DIFFERENT type: 1
  is for the path the file will be saved to and 2 the file itself. I'm looking
  for the correct method definition instead of 2 @Requestparam which give error in STS.</p>
  <pre><code>@PostMapping(&quot;/{path}/&quot;)
  public String handleFileUpload(@RequestParam(&quot;path&quot;), @RequestParam(&quot;file&quot;) MultipartFile file,
          RedirectAttributes redirectAttributes) {
      
      filesStorageService.store(file);
      redirectAttributes.addFlashAttribute(&quot;message&quot;, &quot;You successfully uploaded &quot; + file.getOriginalFilename() + &quot;!&quot;);
      
      return &quot;redirect:/&quot;;
  }
  </code></pre>