summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorQuoc-Nghia Nguyen <quocnghia.nguyen@orange.com>2018-07-13 09:52:43 +0200
committerQuoc-Nghia Nguyen <quocnghia.nguyen@orange.com>2018-07-13 10:12:24 +0200
commit0e3e6d0a87f7c8dcc998fc57b4c04d49c7a56a76 (patch)
tree493d03e3de47d78d87dab2082c62f1ded50eb516 /src/main/java
parentd44d6c6ea00241f586ee7fb3b173821d98decbab (diff)
add option to disable registration with msb
Issue-ID: EXTAPI-101 Change-Id: I54911da3fde479f1a387f931fdcc72341c5b2092 Signed-off-by: Quoc-Nghia Nguyen <quocnghia.nguyen@orange.com>
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/onap/nbi/ServiceRegisterRunner.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/org/onap/nbi/ServiceRegisterRunner.java b/src/main/java/org/onap/nbi/ServiceRegisterRunner.java
index e8cca00..a30be98 100644
--- a/src/main/java/org/onap/nbi/ServiceRegisterRunner.java
+++ b/src/main/java/org/onap/nbi/ServiceRegisterRunner.java
@@ -37,6 +37,9 @@ import java.util.Set;
public class ServiceRegisterRunner implements CommandLineRunner {
private static final Logger logger = LoggerFactory.getLogger(ServiceRegisterRunner.class);
+ @Value("${msb.enabled}")
+ private boolean IS_ENABLED;
+
@Value("${msb.discovery.host}")
private String DISCOVERY_HOST;
@@ -72,6 +75,8 @@ public class ServiceRegisterRunner implements CommandLineRunner {
@Override
public void run(String... strings) throws Exception {
+ if (!IS_ENABLED) return;
+
MicroServiceInfo msinfo = new MicroServiceInfo();
msinfo.setServiceName(SERVICE_NAME);
msinfo.setVersion(SERVICE_VERSION);