android 发送json 到服务器 spring 怎么接收?
2017-01-02 15:53
281 查看
Android 端 : JsonObject stu=new JsonObject(); stu.put("id",123); stu.put("name","XXX"); StringEntity entity=new StringEntity(stu.toString()); post.setEntity(entity); 服务器端 : @RequestMapping(value="/test2",method=RequestMethod.POST) public Stu test2(@RequestBody Stu stu){ System.out.println(stu); return stu; }
android端返回 :
request entity is in a format not supported by the requested resource for the requested method.
相关文章推荐
- Android接收/发送jSON数据
- Android基于XMPP Smack Openfire开发IM【三】客户端接收服务器发送的消息
- Android使用HttpPost向服务器发送Json数据
- android发送/接收json数据
- android 开发:Json的发送和接收
- android 发送json 到服务器
- 前台怎么接收spring @ResponseBody返回的json数据 map
- Android使用HttpClient以Post、Get请求服务器发送数据的方式(普通和json)
- Android利用JSON发送数据到服务器
- android发送/接收json数据
- android 发送json 到服务器
- Android使用HttpPost向服务器发送Json数据
- 初涉Ajax,以post或get方法发送数据,以json或xml形式接收服务器返回的请求
- Android使用HttpClient以Post、Get请求服务器发送数据的方式(普通和json)
- android发送/接收json数据
- Android之发送与接收JSON数据
- Android使用JSON想服务器发送数据
- Android利用JSON发送数据到服务器
- Android实例demo21之json数据封装,服务器json数据接收
- android发送/接收json数据