|
|
@ -168,8 +168,7 @@ public class MetadataTransferAutoConfiguration {
|
|
|
|
List<ClientHttpRequestInterceptor> interceptors = restTemplate
|
|
|
|
List<ClientHttpRequestInterceptor> interceptors = restTemplate
|
|
|
|
.getInterceptors();
|
|
|
|
.getInterceptors();
|
|
|
|
// Avoid setting interceptor repeatedly.
|
|
|
|
// Avoid setting interceptor repeatedly.
|
|
|
|
if (null != interceptors && !interceptors
|
|
|
|
if (!interceptors.contains(encodeTransferMedataRestTemplateInterceptor)) {
|
|
|
|
.contains(encodeTransferMedataRestTemplateInterceptor)) {
|
|
|
|
|
|
|
|
interceptors.add(encodeTransferMedataRestTemplateInterceptor);
|
|
|
|
interceptors.add(encodeTransferMedataRestTemplateInterceptor);
|
|
|
|
restTemplate.setInterceptors(interceptors);
|
|
|
|
restTemplate.setInterceptors(interceptors);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -207,10 +206,8 @@ public class MetadataTransferAutoConfiguration {
|
|
|
|
List<ClientHttpRequestInterceptor> interceptors = restTemplate
|
|
|
|
List<ClientHttpRequestInterceptor> interceptors = restTemplate
|
|
|
|
.getInterceptors();
|
|
|
|
.getInterceptors();
|
|
|
|
// Avoid setting interceptor repeatedly.
|
|
|
|
// Avoid setting interceptor repeatedly.
|
|
|
|
if (null != interceptors && !interceptors
|
|
|
|
if (!interceptors.contains(encodeTransferMedataRestTemplateInterceptor)) {
|
|
|
|
.contains(encodeTransferMedataRestTemplateInterceptor)) {
|
|
|
|
interceptors.add(this.encodeTransferMedataRestTemplateInterceptor);
|
|
|
|
interceptors
|
|
|
|
|
|
|
|
.add(this.encodeTransferMedataRestTemplateInterceptor);
|
|
|
|
|
|
|
|
restTemplate.setInterceptors(interceptors);
|
|
|
|
restTemplate.setInterceptors(interceptors);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|