public interface DubboInter {
public String saveUsers();
public void hgetUsers();
}
public class DubboInterImpl implements DubboInter{
@Override
public String saveUsers() {
System.out.println("save user");
return "test";
}
@Override
public void hgetUsers() {
System.out.println("dubbo getUsers");
}
}
public class Provider {
public static void main(String[] args) throws Exception {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
new String[] { "spring-mvc.xml" });
context.start();
System.in.read(); // 为保证服务一直开着,利用输入流的阻塞来模拟
}
}