From 7101ee5fe217b6f3d864e2bda979fc0c14f7db92 Mon Sep 17 00:00:00 2001 From: jh7358 Date: Mon, 18 Feb 2019 09:37:38 -0500 Subject: 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 --- .../onap/policy/distribution/main/rest/DistributionRestServer.java | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- cgit 1.2.3-korg