我在开放班次上主持了一个应用程序,现在我遇到了一个奇怪的情况。我有一种方法如下。
@RequestMapping (value = "/saveDetails", method = POST)
@ResponseBody
public User saveUserDetails(@RequestBody User user){
return userService.addUser(user);
}
现在,当我使用fire fox插件'httpPoster'发布用户对象时,
它在localhost上工作正常
但在开放式转移服务器上,它返回415代码。
答案 0 :(得分:0)
I think it should be method = RequesMethod.POST
@RequestMapping(value = "/saveDetails", method = RequestMethod.POST).
Btw a small suggestion, try not using the verbs to describe the rest services.