summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--holmes-actions/src/main/java/org/openo/holmes/common/api/entity/ServiceNode.java8
-rw-r--r--holmes-actions/src/main/java/org/openo/holmes/common/api/entity/ServiceRegisterEntity.java8
-rw-r--r--holmes-actions/src/main/java/org/openo/holmes/common/utils/MSBRegisterUtil.java3
3 files changed, 18 insertions, 1 deletions
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/api/entity/ServiceNode.java b/holmes-actions/src/main/java/org/openo/holmes/common/api/entity/ServiceNode.java
index 429bf3b..e6cf4c3 100644
--- a/holmes-actions/src/main/java/org/openo/holmes/common/api/entity/ServiceNode.java
+++ b/holmes-actions/src/main/java/org/openo/holmes/common/api/entity/ServiceNode.java
@@ -17,9 +17,17 @@
package org.openo.holmes.common.api.entity;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import lombok.AllArgsConstructor;
+import lombok.Data;
import lombok.Getter;
+import lombok.NoArgsConstructor;
import lombok.Setter;
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@JsonIgnoreProperties(ignoreUnknown = true)
@Getter
@Setter
public class ServiceNode {
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/api/entity/ServiceRegisterEntity.java b/holmes-actions/src/main/java/org/openo/holmes/common/api/entity/ServiceRegisterEntity.java
index e7b032c..6db084b 100644
--- a/holmes-actions/src/main/java/org/openo/holmes/common/api/entity/ServiceRegisterEntity.java
+++ b/holmes-actions/src/main/java/org/openo/holmes/common/api/entity/ServiceRegisterEntity.java
@@ -16,11 +16,19 @@
package org.openo.holmes.common.api.entity;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.util.ArrayList;
import java.util.List;
+import lombok.AllArgsConstructor;
+import lombok.Data;
import lombok.Getter;
+import lombok.NoArgsConstructor;
import lombok.Setter;
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@JsonIgnoreProperties(ignoreUnknown = true)
@Setter
@Getter
public class ServiceRegisterEntity {
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/utils/MSBRegisterUtil.java b/holmes-actions/src/main/java/org/openo/holmes/common/utils/MSBRegisterUtil.java
index 176107e..e18a15c 100644
--- a/holmes-actions/src/main/java/org/openo/holmes/common/utils/MSBRegisterUtil.java
+++ b/holmes-actions/src/main/java/org/openo/holmes/common/utils/MSBRegisterUtil.java
@@ -19,7 +19,6 @@ package org.openo.holmes.common.utils;
import com.eclipsesource.jaxrs.consumer.ConsumerFactory;
import java.io.IOException;
import lombok.extern.slf4j.Slf4j;
-import org.apache.http.client.methods.HttpRequestBase;
import org.glassfish.jersey.client.ClientConfig;
import org.jvnet.hk2.annotations.Service;
import org.openo.holmes.common.api.entity.ServiceRegisterEntity;
@@ -52,6 +51,8 @@ public class MSBRegisterUtil {
private boolean inner_register(ServiceRegisterEntity entity) {
ClientConfig config = new ClientConfig();
try {
+ log.info("msbServerAddr:" + MicroServiceConfig.getMsbServerAddr());
+ log.info("entity:" + entity);
MicroserviceBusRest resourceserviceproxy = ConsumerFactory.createConsumer(
MicroServiceConfig.getMsbServerAddr(), config, MicroserviceBusRest.class);
resourceserviceproxy.registerServce("false", entity);