use of org.springframework.context.support.ClassPathXmlApplicationContext in project dubbo by alibaba.
the class DubboDemoProvider method main.
public static void main(String[] args) throws Exception {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("dubbo-demo-provider.xml");
context.start();
System.out.println("context started");
System.in.read();
}
use of org.springframework.context.support.ClassPathXmlApplicationContext 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();
}
use of org.springframework.context.support.ClassPathXmlApplicationContext in project dubbo by alibaba.
the class RpcBenchmarkServer method main.
public static void main(String[] args) throws Exception {
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("ProviderSample.xml");
ctx.start();
synchronized (RpcBenchmarkServer.class) {
try {
RpcBenchmarkServer.class.wait();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
use of org.springframework.context.support.ClassPathXmlApplicationContext in project dubbo by alibaba.
the class AnnotationProvider method main.
public static void main(String[] args) throws Exception {
String config = AnnotationProvider.class.getPackage().getName().replace('.', '/') + "/annotation-provider.xml";
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(config);
context.start();
System.in.read();
}
use of org.springframework.context.support.ClassPathXmlApplicationContext in project dubbo by alibaba.
the class VersionProvider method main.
public static void main(String[] args) throws Exception {
String config = VersionProvider.class.getPackage().getName().replace('.', '/') + "/version-provider.xml";
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(config);
context.start();
System.in.read();
}
Aggregations