summaryrefslogtreecommitdiffstats
path: root/engine-d/src
diff options
context:
space:
mode:
authorGuangrongFu <fu.guangrong@zte.com.cn>2017-03-13 11:12:33 +0800
committerGuangrongFu <fu.guangrong@zte.com.cn>2017-03-13 11:14:14 +0800
commit8c3705448e558e0d4aed1b0bb152d437367c5b8e (patch)
tree44a7079ecf312ed08a0f3c25a278411649cac0a1 /engine-d/src
parent2ac4b907a97794f0913432a3bde547c1809d1f19 (diff)
Change the Type of Return to String
Change-Id: Iba90d0696deca3f82bc5ff6fafe6e9fcb0896cf9 Issue-ID: HOLMES-50 Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'engine-d/src')
-rw-r--r--engine-d/src/main/java/org/openo/holmes/engine/resources/EngineResources.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/engine-d/src/main/java/org/openo/holmes/engine/resources/EngineResources.java b/engine-d/src/main/java/org/openo/holmes/engine/resources/EngineResources.java
index 20b38ef..c125d07 100644
--- a/engine-d/src/main/java/org/openo/holmes/engine/resources/EngineResources.java
+++ b/engine-d/src/main/java/org/openo/holmes/engine/resources/EngineResources.java
@@ -33,6 +33,7 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import lombok.extern.slf4j.Slf4j;
+import net.sf.json.JSONObject;
import org.jvnet.hk2.annotations.Service;
import org.openo.holmes.common.api.entity.ServiceRegisterEntity;
import org.openo.holmes.common.config.MicroServiceConfig;
@@ -71,7 +72,7 @@ public class EngineResources {
@ApiOperation(value = "Add rule to Engine and Cache", response = CorrelationRuleResponse.class)
@Produces(MediaType.APPLICATION_JSON)
@Timed
- public CorrelationRuleResponse deployRule(DeployRuleRequest deployRuleRequest,
+ public String deployRule(DeployRuleRequest deployRuleRequest,
@Context HttpServletRequest httpRequest) {
CorrelationRuleResponse crResponse = new CorrelationRuleResponse();
@@ -87,7 +88,7 @@ public class EngineResources {
throw ExceptionUtil.buildExceptionResponse(correlationException.getMessage());
}
- return crResponse;
+ return JSONObject.fromObject(crResponse).toString();
}
@DELETE