aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-10-23 01:12:21 +0300
committerIttay Stern <ittay.stern@att.com>2019-10-23 14:19:09 +0300
commit2cfa1222fba11ebcf2f9b20fde2ca442ac13300a (patch)
treeeb9c4c897f86eaca9b0884891a606139298bed0a /vid-app-common/src
parentd90cc53c8a66b50038576df2e74e8fe383969f22 (diff)
Install incoming-requests auditor
Issue-ID: VID-253 Change-Id: I62aa4c0b1ab360f01eb00bb6aa83fe0e30e362ac Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-app-common/src')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/controller/WebConfig.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/WebConfig.java b/vid-app-common/src/main/java/org/onap/vid/controller/WebConfig.java
index 6936d0a71..6c5595ca3 100644
--- a/vid-app-common/src/main/java/org/onap/vid/controller/WebConfig.java
+++ b/vid-app-common/src/main/java/org/onap/vid/controller/WebConfig.java
@@ -29,6 +29,7 @@ import java.io.File;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import javax.servlet.ServletContext;
+import org.onap.logging.filter.spring.LoggingInterceptor;
import org.onap.portalsdk.core.util.SystemProperties;
import org.onap.vid.aai.AaiClient;
import org.onap.vid.aai.AaiClientInterface;
@@ -68,6 +69,8 @@ import org.onap.vid.utils.Logging;
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;
@@ -77,7 +80,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableSwagger2
@Configuration
-public class WebConfig {
+public class WebConfig implements WebMvcConfigurer {
/**
* Gets the object mapper.
@@ -216,4 +219,9 @@ public class WebConfig {
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 LoggingInterceptor());
+ }
}