Closed duke-cliff closed 7 years ago
Can you provide a reproducer for this issue?
Making version
optional makes sense, I just need to be sure it's a bug and have a way to test it.
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())));
}