register(agentClient, management);
}
if (!appProps.getRoutes().isEmpty()) {
try {
KVClient kvClient = context.getBean(KVClient.class);
String key = String.format("routing/%s", appProps.getId());
//TODO: get routes from jax-rs and spring mvc
kvClient.put(key, appProps.getRoutes());
} catch (Exception e) {
LOGGER.error("Error writing routes for app: " + appProps.getId(), e);
}
}
}