From 9a316525cf233fcd25b51a803ca00b4488d4800b Mon Sep 17 00:00:00 2001
From: "wanzhiji@amazon.com" <wanzhiji@amazon.com>
Date: Thu, 26 Aug 2021 15:33:03 +0000
Subject: [PATCH] update on cache autowire injection

---
 .../osdu/partition/provider/aws/cache/GroupCache.java       | 6 +++---
 .../partition-aws/src/main/resources/application.properties | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/provider/partition-aws/src/main/java/org/opengroup/osdu/partition/provider/aws/cache/GroupCache.java b/provider/partition-aws/src/main/java/org/opengroup/osdu/partition/provider/aws/cache/GroupCache.java
index b97638cf1..c33304894 100644
--- a/provider/partition-aws/src/main/java/org/opengroup/osdu/partition/provider/aws/cache/GroupCache.java
+++ b/provider/partition-aws/src/main/java/org/opengroup/osdu/partition/provider/aws/cache/GroupCache.java
@@ -33,11 +33,11 @@ import java.util.Map;
 
 @Component
 public class GroupCache {
-    @Value("${aws.elasticache.cluster.endpoint:null}")
+    @Value("${aws.elasticache.cluster.endpoint}")
     String REDIS_SEARCH_HOST;
-    @Value("${aws.elasticache.cluster.port:null}")
+    @Value("${aws.elasticache.cluster.port}")
     String REDIS_SEARCH_PORT;
-    @Value("${aws.elasticache.cluster.key:null}")
+    @Value("${aws.elasticache.cluster.key}")
     String REDIS_SEARCH_KEY;
     public ICache<String, Groups> GetGroupCache() throws K8sParameterNotFoundException, JsonProcessingException {
         K8sLocalParameterProvider provider = new K8sLocalParameterProvider();
diff --git a/provider/partition-aws/src/main/resources/application.properties b/provider/partition-aws/src/main/resources/application.properties
index 1d5f89d7f..a5f1e4fee 100644
--- a/provider/partition-aws/src/main/resources/application.properties
+++ b/provider/partition-aws/src/main/resources/application.properties
@@ -45,6 +45,6 @@ server.ssl.key-store-password=${SSL_KEY_STORE_PASSWORD:}
 
 spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration
 ## AWS ElastiCache configuration
-aws.elasticache.cluster.endpoint=${CACHE_CLUSTER_ENDPOINT}
-aws.elasticache.cluster.port=${CACHE_CLUSTER_PORT}
-aws.elasticache.cluster.key=${CACHE_CLUSTER_KEY}
\ No newline at end of file
+aws.elasticache.cluster.endpoint=${CACHE_CLUSTER_ENDPOINT:null}
+aws.elasticache.cluster.port=${CACHE_CLUSTER_PORT:null}
+aws.elasticache.cluster.key=${CACHE_CLUSTER_KEY:null}
\ No newline at end of file
-- 
GitLab