我正在尝试使用RestTemplate和@EnableDiscoveryClient一起使用,它最终调用了带阻断器。在调用堆栈中,最后进行下列调用:
org.springframework.cloud.netflix.ribbon.RibbonClientHttpRequestFactory$
RibbonHttpRequest.getBodyInternal(RibbonClientHttpRequestFactory.java:105)下面是这个getBodyInternal方法的代码:
@Override
protected OutputStream getBodyInternal(HttpHeaders headers) throws IOException {
throw new RuntimeException("Not implemented");
}我的问题是,是什么情况导致这种未实现的方法,以及如何避免这种情况?我正在使用RestTemplate.postForLocation。这种方法不应该用丝带拦截器调用,这是一个普遍的假设吗?
发布于 2015-07-09 15:07:04
尝试使用1.0.3.RELEASE版本,它是spring-cloud-starter-parent:Angel.SR3的一部分。这一方法已经实施。
https://stackoverflow.com/questions/31235294
复制相似问题