resttemplate

    81热度

    10回答

    我没有找到任何示例如何解决我的问题,所以我想问你的帮助。使用RestTemplate对象,我不能简单地发送POST请求JSON 每次我org.springframework.web.client.HttpClientErrorException:415不支持的媒体类型 我以这种方式使用RestTemplate: ... restTemplate = new RestTemplate(); Li

    34热度

    9回答

    我正在使用Spring 3和RestTemplate。我基本上有两个应用程序,其中一个必须将值发布到另一个应用程序。通过休息模板。 当要发布的值是字符串,它的工作完美,但是当我必须发布混合和复杂的参数(如MultipartFiles)时,我得到一个转换器异常。 作为实例,我有这样的: App1的 - PostController中: @RequestMapping(method = Request

    1热度

    1回答

    我想用春天的休息模板做一个发布请求。我需要返回状态码。这是我的方法。 RestTemplate restTemplate = new RestTemplate(); MultiValueMap mvm = new LinkedMultiValueMap(); mvm.add("login", "100"); // and some more paramters String result = re

    28热度

    5回答

    我在两台不同的机器上有两个基于Spring的Web应用程序A和B. 我想从Web应用程序A到Web应用程序B进行https呼叫,但是我在机器B中使用了自签名证书。所以我的HTTPS请求失败。 如何在Spring中使用RestTemplate时禁用https证书验证?我想禁用验证,因为两者的web应用程序A和B都在内部网络中,但数据传输已经发生了HTTPS