summaryrefslogtreecommitdiffstats
path: root/prh-app-server/src/main
diff options
context:
space:
mode:
authorMaciej Malewski <maciej.malewski@nokia.com>2021-02-03 10:45:43 +0100
committerMaciej Malewski <maciej.malewski@nokia.com>2021-02-03 12:04:35 +0100
commit14011f96caec688a121f9a9f19a0f27c37a67770 (patch)
tree0153293c221a43de9aedee123e7c17244520c692 /prh-app-server/src/main
parent96d7a363baa17b931d1599e4582de2fe6ee22574 (diff)
Upgrade Spring Boot and Spring Cloud versions
Spring Boot from 2.2.4.RELEASE to 2.4.2 Spring Cloud from Greenwich.SR1 to 2020.0.1 Issue-ID: DCAEGEN2-2537 Signed-off-by: Maciej Malewski <maciej.malewski@nokia.com> Change-Id: I51c8c450133a68435799802f548bb16ba562550c
Diffstat (limited to 'prh-app-server/src/main')
-rw-r--r--prh-app-server/src/main/java/org/onap/dcaegen2/services/bootstrap/CbsPropertySourceLocator.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/bootstrap/CbsPropertySourceLocator.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/bootstrap/CbsPropertySourceLocator.java
index 7b660202..c068988c 100644
--- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/bootstrap/CbsPropertySourceLocator.java
+++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/bootstrap/CbsPropertySourceLocator.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* PNF-REGISTRATION-HANDLER
* ================================================================================
- * Copyright (C) 2019 NOKIA Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2021 NOKIA Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,6 +31,7 @@ import org.springframework.cloud.bootstrap.config.PropertySourceLocator;
import org.springframework.core.env.Environment;
import org.springframework.core.env.MapPropertySource;
import org.springframework.core.env.PropertySource;
+import reactor.util.retry.Retry;
import java.util.Map;
@@ -63,9 +64,9 @@ public class CbsPropertySourceLocator implements PropertySourceLocator {
Map<String, Object> properties = cbsClientFactoryFacade.createCbsClient(cbsClientConfiguration)
.flatMap(cbsClient -> cbsClient.get(CbsRequests.getAll(RequestDiagnosticContext.create())))
.doOnError(e -> LOGGER.warn("Failed fetching config properties from CBS - retrying...", e))
- .retryBackoff(cbsProperties.getFetchRetries().getMaxAttempts(),
- cbsProperties.getFetchRetries().getFirstBackoff(),
- cbsProperties.getFetchRetries().getMaxBackoff())
+ .retryWhen(Retry.
+ backoff(cbsProperties.getFetchRetries().getMaxAttempts(), cbsProperties.getFetchRetries().getFirstBackoff()).
+ maxBackoff(cbsProperties.getFetchRetries().getMaxBackoff()))
.doOnNext(this::updateCbsConfig)
.map(cbsJsonToPropertyMapConverter::convertToMap)
.block();