我可以创建多个具有相同请求映射和不同请求正文的 HTTP POST 方法吗
@RequestMapping("api/v1/")
@RequestMapping(value = "test" ,method = RequestMethod.POST)
public RObjet create(@RequestBody RBody rbody)
{
// do some process...
}
@RequestMapping("api/v1/")
@RequestMapping(value = "test" ,method = RequestMethod.POST)
public RObjet2 create2(@RequestBody RBody2 rbody)
{
// do something.
}
Run Code Online (Sandbox Code Playgroud)
这可能吗。?我们如何在 Spring Boot 中处理这个问题。