Search in sources :

Example 1 with Demo

use of org.apache.dubbo.rpc.gen.thrift.Demo in project dubbo by alibaba.

the class DubboDemoConsumer method main.

public static void main(String[] args) throws Exception {
    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("dubbo-demo-consumer.xml");
    context.start();
    Demo.Iface demo = (Demo.Iface) context.getBean("demoService");
    System.out.println(demo.echoI32(32));
    for (int i = 0; i < 10; i++) {
        System.out.println(demo.echoI32(i + 1));
    }
    context.close();
}
Also used : Demo(org.apache.dubbo.rpc.gen.thrift.Demo) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext)

Aggregations

Demo (org.apache.dubbo.rpc.gen.thrift.Demo)1 ClassPathXmlApplicationContext (org.springframework.context.support.ClassPathXmlApplicationContext)1