import org.onap.vid.asdc.parser.VidNotionsBuilder;
import org.onap.vid.asdc.rest.SdcRestClient;
import org.onap.vid.client.SyncRestClient;
+import org.onap.vid.logging.VidLoggingInterceptor;
import org.onap.vid.properties.AsdcClientConfiguration;
import org.onap.vid.properties.VidProperties;
import org.onap.vid.scheduler.SchedulerService;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.togglz.core.manager.FeatureManager;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
@EnableSwagger2
@Configuration
-public class WebConfig {
+public class WebConfig implements WebMvcConfigurer {
/**
* Gets the object mapper.
String protocol = asdcClientConfiguration.getAsdcClientProtocol();
int port = asdcClientConfiguration.getAsdcClientPort();
- return new SdcRestClient(protocol + "://" + host + ":" + port + "/", auth, new SyncRestClient(loggingService), loggingService);
+ return new SdcRestClient(protocol + "://" + host + ":" + port + "/", auth,
+ new SyncRestClient( loggingService, true),
+ loggingService);
}
@Bean
int threadsCount = defaultIfNull(Integer.parseInt(SystemProperties.getProperty(VidProperties.VID_THREAD_COUNT)), 1);
return Executors.newFixedThreadPool(threadsCount);
}
+
+ @Override
+ public void addInterceptors(InterceptorRegistry registry) {
+ registry.addInterceptor(new VidLoggingInterceptor());
+ }
}