2 spring great spring_great 于 2015.07.08 16:16 提问

android 调用springMVC接口传值问题 2C

我后台框架是springMVC 现在android端调用接口的时候,参数值为空,name接收不到值,下边是后台接口示列,求高手解答
@ResponseBody
@RequestMapping(value = "/editPhotos", method = {RequestMethod.POST,RequestMethod.GET})
public Response editPhotos(String name) {
System.out.print(name);
Response response = new Response();
response.getResult().setResult("1");
response.getResult().setMessage("操作成功");
return response;
}

2个回答

caozhy
caozhy   Ds   Rxr 2015.07.08 22:19
ClementAD
ClementAD   2015.07.09 20:10

试试这个:public Response editPhotos(@Param("name") String name)

Csdn user default icon
上传中...
上传图片
插入图片