实现
- 简易RPC框架
1 | import java.io.ObjectInputStream; |
- 定义服务接口
1 | public interface HelloService { |
- 实现服务
1 | public class HelloServiceImpl implements HelloService { |
- 暴露服务
1 | public class RpcProvider { |
- 引用服务
1 | public class RpcConsumer { |
参考
- 转自:PC框架几行代码就够了
1 | import java.io.ObjectInputStream; |
1 | public interface HelloService { |
1 | public class HelloServiceImpl implements HelloService { |
1 | public class RpcProvider { |
1 | public class RpcConsumer { |
微信支付