问题描述
- android 调用springMVC接口传值问题
-
我后台框架是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;
}
解决方案
http://cloudbbs.org/forum.php?mod=viewthread&tid=31880
解决方案二:
试试这个:public Response editPhotos(@Param("name") String name)
时间: 2024-10-31 13:37:14