aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjh7358 <jh7358@att.com>2019-02-18 09:37:38 -0500
committerJim Hahn <jrh3@att.com>2019-02-18 09:52:51 -0500
commit7101ee5fe217b6f3d864e2bda979fc0c14f7db92 (patch)
tree7bf6d6ca6ec70db5713e0dcda7c8716044a2e11d
parent48a745734533d42e2d9e7b9d04d08cbe8ee1b62c (diff)
Use gson by default
Add a property to force the REST server to use gson instead of jackson. Change-Id: I0dd762e0f9b4a4809f68e5b5498e16136f611d12 Issue-ID: POLICY-1525 Signed-off-by: Jim Hahn <jrh3@att.com>
-rw-r--r--main/src/main/java/org/onap/policy/distribution/main/rest/DistributionRestServer.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/src/main/java/org/onap/policy/distribution/main/rest/DistributionRestServer.java b/main/src/main/java/org/onap/policy/distribution/main/rest/DistributionRestServer.java
index 8f7652b8..8e78fdb7 100644
--- a/main/src/main/java/org/onap/policy/distribution/main/rest/DistributionRestServer.java
+++ b/main/src/main/java/org/onap/policy/distribution/main/rest/DistributionRestServer.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
* Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,6 +28,7 @@ import java.util.Properties;
import org.onap.policy.common.capabilities.Startable;
import org.onap.policy.common.endpoints.http.server.HttpServletServer;
+import org.onap.policy.common.gson.JacksonHandler;
import org.onap.policy.distribution.main.parameters.RestServerParameters;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -94,6 +96,8 @@ public class DistributionRestServer implements Startable {
restServerParameters.getPassword());
props.setProperty(HTTP_SERVER_SERVICES + SEPARATOR + restServerParameters.getName() + ".https",
String.valueOf(restServerParameters.isHttps()));
+ props.setProperty(HTTP_SERVER_SERVICES + SEPARATOR + restServerParameters.getName() + ".serialization.provider",
+ JacksonHandler.class.getName());
return props;
}