Search in sources :

Example 1 with GreetingsServiceImpl

use of com.baeldung.dubbo.remote.GreetingsServiceImpl in project tutorials by eugenp.

the class APIConfigurationLiveTest method initProvider.

@Before
public void initProvider() {
    ApplicationConfig application = new ApplicationConfig();
    application.setName("demo-provider");
    application.setVersion("1.0");
    RegistryConfig registryConfig = new RegistryConfig();
    registryConfig.setAddress("multicast://224.1.1.1:9090");
    ServiceConfig<GreetingsService> service = new ServiceConfig<>();
    service.setApplication(application);
    service.setRegistry(registryConfig);
    service.setInterface(GreetingsService.class);
    service.setRef(new GreetingsServiceImpl());
    service.export();
}
Also used : RegistryConfig(com.alibaba.dubbo.config.RegistryConfig) ApplicationConfig(com.alibaba.dubbo.config.ApplicationConfig) ServiceConfig(com.alibaba.dubbo.config.ServiceConfig) GreetingsService(com.baeldung.dubbo.remote.GreetingsService) GreetingsServiceImpl(com.baeldung.dubbo.remote.GreetingsServiceImpl) Before(org.junit.Before)

Aggregations

ApplicationConfig (com.alibaba.dubbo.config.ApplicationConfig)1 RegistryConfig (com.alibaba.dubbo.config.RegistryConfig)1 ServiceConfig (com.alibaba.dubbo.config.ServiceConfig)1 GreetingsService (com.baeldung.dubbo.remote.GreetingsService)1 GreetingsServiceImpl (com.baeldung.dubbo.remote.GreetingsServiceImpl)1 Before (org.junit.Before)1