package com.mridul.software.automation.rest.customizers;
import com.mridul.software.automation.rest.interceptors.ExtentLoggingClientHttpRequestInterceptor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.client.RestTemplateCustomizer;
import org.springframework.web.client.RestTemplate;
@Slf4j
public class ExtentLoggingRestTemplateCustomizer implements RestTemplateCustomizer {
@Autowired
private ExtentLoggingClientHttpRequestInterceptor interceptor;
@Override
public void customize(RestTemplate restTemplate) {
restTemplate.getInterceptors().add(interceptor);
}
}
Comments
Post a Comment