0

I am trying to use RestTemplate with @EnableDiscoveryClient which ends up calling the Ribbon Interceptor. Down the call stack, the following call ends up being made:

org.springframework.cloud.netflix.ribbon.RibbonClientHttpRequestFactory$
RibbonHttpRequest.getBodyInternal(RibbonClientHttpRequestFactory.java:105)

Now, here is the code of this getBodyInternal method:

 @Override
 protected OutputStream getBodyInternal(HttpHeaders headers) throws IOException {
        throw new RuntimeException("Not implemented");
 }

My question is what cases lead to this not implemented method and how can I avoid that? I am using RestTemplate.postForLocation. Is it a general assumption that this method should not be called with Ribbon interceptor?

4

1 回答 1

2

尝试使用1.0.3.RELEASE属于spring-cloud-starter-parent:Angel.SR3. 该方法已实现。

于 2015-07-09T15:07:04.490 回答