From d328431a731087753f0c1d8a02d042a0735adbf3 Mon Sep 17 00:00:00 2001 From: Harshit Aggarwal Date: Thu, 13 Aug 2020 13:08:23 +0530 Subject: [PATCH 1/2] Updating readme with instructions to support new logging changes --- README.md | 14 ++++++++++++++ pom.xml | 2 +- .../osdu/azure/di/CosmosDBConfiguration.java | 2 ++ src/main/resources/application.properties | 19 ------------------- 4 files changed, 17 insertions(+), 20 deletions(-) delete mode 100644 src/main/resources/application.properties diff --git a/README.md b/README.md index e92dc67b..1100fd80 100644 --- a/README.md +++ b/README.md @@ -65,3 +65,17 @@ You need to connect to our feed on [Azure DevOps](https://slb-swt.visualstudio.c ``` + +## Changes to support newly Added transaction logger and slf4jlogger +The consumer service might run into multiple logger bindings error on start up +which can be fixed by excluding some of the logger dependencies. + +Note: Below are reference PRs for exclusion and might change from service to service + +Refer this [MR](https://community.opengroup.org/osdu/platform/security-and-compliance/entitlements-azure/-/merge_requests/13) as reference on how to exclude dependencies along with how to enable the +Enabled transaction logger and slf4jlogger +## Environment variables required to consume the TenantFactoryImpl +| name | value | description | +| --- | --- | --- | +| `tenantInfo.container.name` | `TenantInfo` | cosmos container name | +| `azure.cosmosdb.database` | ex `dev-osdu-r2-db` | cosmos databse name | \ No newline at end of file diff --git a/pom.xml b/pom.xml index c4e11784..e8cfd97b 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ org.opengroup.osdu core-lib-azure jar - 0.0.17 + 0.0.18 core-lib-azure diff --git a/src/main/java/org/opengroup/osdu/azure/di/CosmosDBConfiguration.java b/src/main/java/org/opengroup/osdu/azure/di/CosmosDBConfiguration.java index 1f90097f..792f2ec8 100644 --- a/src/main/java/org/opengroup/osdu/azure/di/CosmosDBConfiguration.java +++ b/src/main/java/org/opengroup/osdu/azure/di/CosmosDBConfiguration.java @@ -3,12 +3,14 @@ package org.opengroup.osdu.azure.di; import lombok.Getter; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Lazy; /** * A configuration bean class to set up CosmosDb variables. */ @Configuration @Getter +@Lazy public class CosmosDBConfiguration { @Value("${tenantInfo.container.name}") diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties deleted file mode 100644 index d817f227..00000000 --- a/src/main/resources/application.properties +++ /dev/null @@ -1,19 +0,0 @@ -# -# Copyright © Microsoft Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Azure CosmosDB configuration -tenantInfo.container.name=TenantInfo -azure.cosmosdb.database=${cosmosdb_database} \ No newline at end of file -- GitLab From 13aa8135b4c140d2994093836f4cdc9e2e8e6422 Mon Sep 17 00:00:00 2001 From: Harshit Aggarwal Date: Thu, 13 Aug 2020 13:14:33 +0530 Subject: [PATCH 2/2] minor change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1100fd80..f9093e5a 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Note: Below are reference PRs for exclusion and might change from service to ser Refer this [MR](https://community.opengroup.org/osdu/platform/security-and-compliance/entitlements-azure/-/merge_requests/13) as reference on how to exclude dependencies along with how to enable the Enabled transaction logger and slf4jlogger -## Environment variables required to consume the TenantFactoryImpl +## Environment variables to be added in application.properties to consume the TenantFactoryImpl | name | value | description | | --- | --- | --- | | `tenantInfo.container.name` | `TenantInfo` | cosmos container name | -- GitLab