- this.appConfig.setConfiguration(parser.getRicConfigs(), parser.getDmaapConsumerConfig());
+ this.appConfig.setConfiguration(parser.getRicConfigs(), parser.getDmaapPublisherConfig(),
+ parser.getDmaapConsumerConfig());
} catch (ServiceException e) {
logger.error("Could not parse configuration {}", e.toString(), e);
}
} catch (ServiceException e) {
logger.error("Could not parse configuration {}", e.toString(), e);
}
ServiceLoader.load(TypeAdapterFactory.class).forEach(gsonBuilder::registerTypeAdapterFactory);
try (InputStream inputStream = createInputStream(filepath)) {
ServiceLoader.load(TypeAdapterFactory.class).forEach(gsonBuilder::registerTypeAdapterFactory);
try (InputStream inputStream = createInputStream(filepath)) {
if (rootObject == null) {
throw new JsonSyntaxException("Root is not a json object");
}
ApplicationConfigParser appParser = new ApplicationConfigParser();
appParser.parse(rootObject);
if (rootObject == null) {
throw new JsonSyntaxException("Root is not a json object");
}
ApplicationConfigParser appParser = new ApplicationConfigParser();
appParser.parse(rootObject);
- appConfig.setConfiguration(appParser.getRicConfigs(), appParser.getDmaapConsumerConfig());
+ appConfig.setConfiguration(appParser.getRicConfigs(), appParser.getDmaapPublisherConfig(),
+ appParser.getDmaapConsumerConfig());
logger.info("Local configuration file loaded: {}", filepath);
} catch (JsonSyntaxException | ServiceException | IOException e) {
logger.trace("Local configuration file not loaded: {}", filepath, e);
}
}
logger.info("Local configuration file loaded: {}", filepath);
} catch (JsonSyntaxException | ServiceException | IOException e) {
logger.trace("Local configuration file not loaded: {}", filepath, e);
}
}
- JsonElement getJsonElement(JsonParser parser, InputStream inputStream) {
- return parser.parse(new InputStreamReader(inputStream));
+ JsonElement getJsonElement(InputStream inputStream) {
+ return JsonParser.parseReader(new InputStreamReader(inputStream));