From: jh7358 Date: Mon, 18 Feb 2019 14:37:38 +0000 (-0500) Subject: Use gson by default X-Git-Tag: 2.1.0~16 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F73%2F78673%2F1;p=policy%2Fdistribution.git 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 --- 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; }