リボンインターセプターを呼び出すこと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
います。このメソッドをリボン インターセプターで呼び出すべきではないという一般的な前提はありますか?