Search in sources :

Example 1 with RegistryBean

use of org.apache.servicecomb.localregistry.RegistryBean in project java-chassis by ServiceComb.

the class RegistryBeansConfiguration method demoLocalRegistryServerBean.

@Bean
public RegistryBean demoLocalRegistryServerBean() {
    List<String> endpoints = new ArrayList<>();
    endpoints.add("rest://localhost:8080");
    List<Instance> instances = new ArrayList<>();
    instances.add(new Instance().setEndpoints(endpoints));
    return new RegistryBean().setServiceName("demo-local-registry-server-bean").setId("002").setVersion("0.0.3").setAppId("demo-local-registry").addSchemaId("ServerEndpoint").addSchemaId("CodeFirstEndpoint").setInstances(new Instances().setInstances(instances));
}
Also used : Instances(org.apache.servicecomb.localregistry.RegistryBean.Instances) Instance(org.apache.servicecomb.localregistry.RegistryBean.Instance) RegistryBean(org.apache.servicecomb.localregistry.RegistryBean) ArrayList(java.util.ArrayList) RegistryBean(org.apache.servicecomb.localregistry.RegistryBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

ArrayList (java.util.ArrayList)1 RegistryBean (org.apache.servicecomb.localregistry.RegistryBean)1 Instance (org.apache.servicecomb.localregistry.RegistryBean.Instance)1 Instances (org.apache.servicecomb.localregistry.RegistryBean.Instances)1 Bean (org.springframework.context.annotation.Bean)1