1234567891011121314151617 |
- package cn.hhj;
- import cn.hhj.config.SpringConfig;
- import cn.hhj.proxy.RpcProxyClient;
- import cn.hhj.service.IHelloService;
- import org.springframework.context.ApplicationContext;
- import org.springframework.context.annotation.AnnotationConfigApplicationContext;
- public class RpcClientStart {
- public static void main( String[] args ) {
- ApplicationContext context=new AnnotationConfigApplicationContext(SpringConfig.class);
- RpcProxyClient rpcProxyClient=context.getBean(RpcProxyClient.class);
- IHelloService helloService=rpcProxyClient.getClientProxy(IHelloService.class);
- System.out.println(helloService.sayHello("noSum"));
- }
- }
|