You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
private void parse(JsonObject body, Handler<AsyncResult> handler) {
String version = body.getString("version", null);
JsonArray sources = body.getJsonArray("propertySources", null); //does not use version at all. should allow version to be null
if (sources == null) {
handler.handle(Future.failedFuture("Invalid configuration server response, property sources missing"));
} else {
JsonObject configuration = new JsonObject();
for (int i = 0; i < sources.size(); i++) {
JsonObject source = sources.getJsonObject(i);
JsonObject content = source.getJsonObject("source");
configuration = configuration.mergeIn(content);
}
handler.handle(Future.succeededFuture(Buffer.buffer(configuration.encode())));
}
The text was updated successfully, but these errors were encountered:
Yes. Some of our microservices are still using spring boot, including our config server is using "spring boot cloud config". The default cloud config when you setup is not including version in the json response. You can give it a try. Thanks.
private void parse(JsonObject body, Handler<AsyncResult> handler) {
String version = body.getString("version", null);
JsonArray sources = body.getJsonArray("propertySources", null);
//does not use version at all. should allow version to be null
if (sources == null) {
handler.handle(Future.failedFuture("Invalid configuration server response, property sources missing"));
} else {
JsonObject configuration = new JsonObject();
for (int i = 0; i < sources.size(); i++) {
JsonObject source = sources.getJsonObject(i);
JsonObject content = source.getJsonObject("source");
configuration = configuration.mergeIn(content);
}
handler.handle(Future.succeededFuture(Buffer.buffer(configuration.encode())));
}
The text was updated successfully, but these errors were encountered: