From e9d903e5f0c762e11d443994eac2ced51afbe3e3 Mon Sep 17 00:00:00 2001 From: youbowu Date: Sat, 11 Mar 2017 16:58:22 +0800 Subject: Add log for debugger Issue-ID: HOLMES-50 Change-Id: I16caea89fb8c5a9a33e73c089a613f1ff2422889 Signed-off-by: youbowu --- .../main/java/org/openo/holmes/common/api/entity/ServiceNode.java | 8 ++++++++ .../org/openo/holmes/common/api/entity/ServiceRegisterEntity.java | 8 ++++++++ .../main/java/org/openo/holmes/common/utils/MSBRegisterUtil.java | 3 ++- 3 files changed, 18 insertions(+), 1 deletion(-) (limited to 'holmes-actions/src') 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); -- cgit 1.2.3-korg