diff options
author | Plummer, Brittany <brittany.plummer@att.com> | 2019-09-10 11:29:42 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@att.com> | 2019-09-10 11:29:42 -0400 |
commit | 2ede5f09c9601d543f20d466a21e9e85c29eacc7 (patch) | |
tree | b9b0e7f777b87a390ce4fb9ba870c49aab382bcc /adapters/mso-catalog-db-adapter/src/main/java | |
parent | 464d3ffa9c373f36747b10a03554d20dfa4a571b (diff) |
Integrate Logging Library
Updated SO to use ONAP provided filters and constants to meet logging
standards.
Removed redundant classes
Updated constant references
Issue-ID: SO-2301
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: Ia4e3c2b1a4dcb3881aa34d39885c8b2782880d64
Diffstat (limited to 'adapters/mso-catalog-db-adapter/src/main/java')
3 files changed, 9 insertions, 4 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/CatalogDBApplication.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/CatalogDBApplication.java index aa19aed515..6fb65ca87e 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/CatalogDBApplication.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/CatalogDBApplication.java @@ -28,7 +28,7 @@ import org.springframework.scheduling.annotation.EnableScheduling; @SpringBootApplication(scanBasePackages = {"org.onap.so.adapters.catalogdb", "org.onap.so.db.catalog.client", "org.onap.so.logging.jaxrs.filter", "org.onap.so.logging.spring.interceptor", "org.onap.so.client", - "org.onap.so.configuration", "org.onap.so.db"}) + "org.onap.so.configuration", "org.onap.so.db", "org.onap.logging.filter"}) @EnableJpaRepositories("org.onap.so.db.catalog.data.repository") @EntityScan("org.onap.so.db.catalog.beans") @EnableScheduling diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/JerseyConfiguration.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/JerseyConfiguration.java index b43447f5c4..699347015b 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/JerseyConfiguration.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/JerseyConfiguration.java @@ -23,10 +23,12 @@ package org.onap.so.adapters.catalogdb; import javax.annotation.PostConstruct; import javax.ws.rs.ApplicationPath; import org.glassfish.jersey.server.ResourceConfig; +import org.onap.logging.filter.base.Constants; +import org.onap.logging.filter.base.ONAPComponents; import org.onap.so.adapters.catalogdb.rest.CatalogDbAdapterRest; import org.onap.so.adapters.catalogdb.rest.ServiceRestImpl; import org.onap.so.adapters.catalogdb.rest.VnfRestImpl; -import org.onap.so.logging.jaxrs.filter.JaxRsFilterLogging; +import org.onap.so.logging.jaxrs.filter.SOAuditLogContainerFilter; import org.springframework.context.annotation.Configuration; import io.swagger.jaxrs.config.BeanConfig; import io.swagger.jaxrs.listing.ApiListingResource; @@ -38,10 +40,11 @@ public class JerseyConfiguration extends ResourceConfig { @PostConstruct public void setUp() { + System.setProperty(Constants.Property.PARTNER_NAME, ONAPComponents.CATALOG_DB.toString()); register(CatalogDbAdapterRest.class); register(ApiListingResource.class); register(SwaggerSerializers.class); - register(JaxRsFilterLogging.class); + register(SOAuditLogContainerFilter.class); register(ServiceRestImpl.class); register(VnfRestImpl.class); BeanConfig beanConfig = new BeanConfig(); diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/WebMvcConfig.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/WebMvcConfig.java index 4dabb58f7d..ff0f8dc432 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/WebMvcConfig.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/WebMvcConfig.java @@ -21,14 +21,16 @@ package org.onap.so.adapters.catalogdb; -import org.onap.so.logging.spring.interceptor.LoggingInterceptor; +import org.onap.logging.filter.spring.LoggingInterceptor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; import org.springframework.web.servlet.handler.MappedInterceptor; @Configuration +@ComponentScan(basePackages = {"org.onap.logging.filter"}) public class WebMvcConfig extends WebMvcConfigurerAdapter { @Autowired |