Modify port
[holmes/common.git] / holmes-actions / src / main / java / org / openo / holmes / common / config / MicroServiceConfig.java
index ba55562..9c6ab3c 100644 (file)
  */\r
 package org.openo.holmes.common.config;\r
 \r
+import org.openo.holmes.common.constant.AlarmConst;\r
+\r
 public class MicroServiceConfig {\r
 \r
-  private static String getProperty(String name) {\r
-    String value = System.getenv(name);\r
-    if (value == null) {\r
-      value = System.getProperty(name);\r
+    private static String getProperty(String name) {\r
+        String value = System.getenv(name);\r
+        if (value == null) {\r
+            value = System.getProperty(name);\r
+        }\r
+        return value;\r
     }\r
-    return value;\r
-  }\r
 \r
-  public static String getMsbServerAddr() {\r
-    return getProperty("MSB_ADDR");\r
-  }\r
+    public static String getMsbServerAddr() {\r
+        return getProperty("MSB_ADDR") + ":" + AlarmConst.MICRO_SERVICE_PORT;\r
+    }\r
 \r
-  public static String getServiceIp() {\r
-    return getProperty("SERVICE_IP");\r
-  }\r
+    public static String getServiceIp() {\r
+        return getProperty("SERVICE_IP");\r
+    }\r
 \r
 }\r