use of org.springframework.cloud.service.ServiceInfo in project spring-cloud-connectors by spring-cloud.
the class LocalConfigServiceOverrideTest method serviceOverride.
@Test
public void serviceOverride() {
env.setSystemProperty("spring.cloud.candygram", "mongodb://youruser:yourpass@40.30.20.10:4321/dbname");
List<ServiceInfo> services = connector.getServiceInfos();
ServiceInfo service = getServiceInfo(services, "candygram");
assertNotNull(service);
assertTrue(service instanceof MongoServiceInfo);
MongoServiceInfo mongo = (MongoServiceInfo) service;
assertEquals("youruser", mongo.getUserName());
assertEquals(4321, mongo.getPort());
}
use of org.springframework.cloud.service.ServiceInfo in project spring-cloud-connectors by spring-cloud.
the class CloudScanHelper method registerServiceBeans.
public void registerServiceBeans(BeanDefinitionRegistry registry) {
initializeCloud(registry);
List<ServiceInfo> serviceInfos = cloud.getServiceInfos();
for (ServiceInfo serviceInfo : serviceInfos) {
registerServiceBean(registry, serviceInfo);
}
}
Aggregations