use of com.pinpoint.test.plugin.api.GreetingsService in project pinpoint by naver.
the class DubboConsumerPluginTestController method sayHi.
@RequestMapping(value = "/sayHi", method = RequestMethod.GET)
@ResponseBody
public String sayHi() {
ReferenceConfig<GreetingsService> reference = new ReferenceConfig<>();
reference.setInterface(GreetingsService.class);
reference.setGeneric("true");
DubboBootstrap bootstrap = DubboBootstrap.getInstance();
bootstrap.application(new ApplicationConfig("dubbo-demo-api-consumer")).registry(new RegistryConfig("zookeeper://" + ZOOKEEPER_HOST + ":2181")).reference(reference).start();
GreetingsService demoService = ReferenceConfigCache.getCache().get(reference);
String message = demoService.sayHi("dubbo");
return message;
}
Aggregations