【问题标题】:Android Spring Rest templateAndroid Spring Rest 模板
【发布时间】:2010-12-02 05:58:35
【问题描述】:

我正在尝试使用 spring rest 模板进行发布请求。我需要返回状态码。这是我的方法。

RestTemplate restTemplate = new RestTemplate();
MultiValueMap mvm = new LinkedMultiValueMap();
mvm.add("login", "100"); // and some more paramters
String result = restTemplate.postForObject("http://localhost:8080/security_check", mvm, String.class);

但是这种方法对我不起作用。它会生成一个错误,提示找不到合适的消息转换器。 我需要知道我可以使用 resttemplate 来管理我的会话。我需要从 android 客户端管理会话。

如果有人遇到android resttemplate post 方法和会话管理,请帮助我。任何帮助将不胜感激。
提前致谢。

【问题讨论】:

    标签: android spring session resttemplate


    【解决方案1】:

    请参阅http://forum.springsource.org/showthread.php?t=99064 请将此问题标记为已回答或将其删除,因为您在我刚刚发布的链接上提出了该问题。

    顺便说一下,我可以看看我关于类似问题的问题...http://forum.springsource.org/showthread.php?t=99690 ;)

    【讨论】:

      猜你喜欢
      • 2023-03-24
      • 2012-11-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-18
      • 1970-01-01
      • 1970-01-01
      • 2013-11-16
      相关资源
      最近更新 更多