import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.stereotype.Service;
+import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonDeserializationContext;
private AppsCacheService appsCacheService;
Gson gson = null;
+ private final ObjectMapper mapper = new ObjectMapper();
+
@PostConstruct
private void init(){
logger.debug(EELFLoggerDelegate.debugLogger, "initializing");
verifyResponse(response);
String str = response.readEntity(String.class);
EcompPortalUtils.logAndSerializeObject(restPath, "GET result =", str);
- try { t = gson.fromJson(str, clazz); } catch(Exception e) {
+ try {
+ t = mapper.readValue(str, clazz);
+ } catch(Exception e) {
logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
EPLogUtil.logEcompError(EPAppMessagesEnum.BeInvalidJsonInput);
}