title: Spring - is it possible to give same url (path) in request mapping for two different post methods?
body: <p>Is it possible to map same path (uri) in request mapping for two different post methods, only difference is request body.</p>
  <p><strong>Example</strong></p>
  <pre><code>  @RequestMapping(value = &quot;/hello&quot;, method = RequestMethod.POST)
    public String helloEmployee(@RequestBody Employee employee) {
      return &quot;Hello Employee&quot;;
    }
  
    @RequestMapping(value = &quot;/hello&quot;, method = RequestMethod.POST)
    public String helloStudent(@RequestBody Student student) {
      return &quot;Hello Student&quot;;
    }
  </code></pre>