use of org.esupportail.papercut.services.RequestResponseLoggingInterceptor in project esup-papercut by EsupPortail.
the class RestConfig method restTemplate.
@Bean
public RestTemplate restTemplate() throws Exception {
SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();
RestTemplate restTemplate = new RestTemplate(new BufferingClientHttpRequestFactory(requestFactory));
restTemplate.setInterceptors(Collections.singletonList(new RequestResponseLoggingInterceptor()));
restTemplate.getMessageConverters().add(0, jacksonConverter());
return restTemplate;
}
Aggregations