title: Overloading SpringBoot @PostMapping controller method not working
body: <p>I have faced some challenge and to describe shortly I created test application. Code you can see and error you can see below.</p>
  <pre><code>@RestController
  public class TestController {
  
      @PostMapping(value = &quot;/test&quot;,params = { &quot;a&quot;, &quot;b&quot; })
      public String test(@RequestPart MultipartFile a, @RequestPart(required = false) MultipartFile b) {
          return &quot;test1&quot;;
      }
  
      @PostMapping(value = &quot;/test&quot;, params = { &quot;b&quot; })
      public String test(@RequestPart MultipartFile b) {
          return &quot;test2&quot;;
      }
  }
  </code></pre>
  <p>I`m trying to execute this request from postman:</p>
  <p><a href="https://i.stack.imgur.com/yUAPH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yUAPH.png" alt="Postman Request" /></a></p>
  <p>And I`m getting such error in logs:</p>
  <pre><code>Resolved [org.springframework.web.bind.UnsatisfiedServletRequestParameterException:
  Parameter conditions &quot;a, b&quot; OR &quot;b&quot; not met for actual request parameters: ]
  </code></pre>
  <p>The thing is, if I will put parameters also in postman (not in body, in request url: <code>localhost:8080/test?b=anything</code>) it will work fine, but I don`t need request params in url.</p>
  <p>Is there some possible way to make it work?</p>