From 2cfa1222fba11ebcf2f9b20fde2ca442ac13300a Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Wed, 23 Oct 2019 01:12:21 +0300 Subject: Install incoming-requests auditor Issue-ID: VID-253 Change-Id: I62aa4c0b1ab360f01eb00bb6aa83fe0e30e362ac Signed-off-by: Ittay Stern --- .../src/main/java/org/onap/vid/controller/WebConfig.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'vid-app-common/src/main/java/org') 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()); + } } -- cgit 1.2.3-korg