spring MVC PUT方式多参数书写

方式一:
@RequestMapping(value = "/", method = RequestMethod.PUT)
public ReturnInfo modifyIsSMSPushedByUserId(@ApiParam("用户ID") @RequestParam Integer userId,
@ApiParam("SMS状态(0或1)") @RequestParam Integer sms){

}

方式二:

@RequestMapping(value = "/", method = RequestMethod.PUT)
public ReturnInfo modifyIsSMSPushedByUserId(@RequestBody EulerAppUserSetting setting){

}

appid为请求头参数

@RequestMapping(value = "/test_code", method = RequestMethod.GET)
public ReturnInfo testCode(@RequestParam(value = "mobile") String mobile, @RequestHeader(name = "appid") String appid) 




你可能感兴趣的:(spring MVC PUT方式多参数书写)