package com.jy.clinet; import com.jy.api.RpcHelloService; import com.jy.api.User; import com.jy.rpc.core.proxy.RpcClientProxy; /****************************************************** * @title: DemoClientMain * @projectName jy-rpc * @description: TODO * @author maojy * @date 2022-05-089:16 * version: 1.0 ****************************************************** */ public class DemoClientMain { public static void main(String[] args) { User user = new User(); user.setName("王二"); RpcClientProxy proxy = new RpcClientProxy("192.168.56.1", 8888); RpcHelloService proxy1 = proxy.getProxy(RpcHelloService.class); proxy1.say(user); User say = proxy1.say(); System.out.println(say.getName()); } }
最近下载更多