首页>代码>Spring+Dubbo+zk,maven项目搭建实例>/zkstudy-client/src/main/java/cn/com/mx/zkstudy_client/App.java
package cn.com.mx.zkstudy_client;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import cn.com.mx.TestRegistryService;


/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
    	ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
				new String[] { "dubbo-consumer.xml"});
          context.start();  
          TestRegistryService demoService = (TestRegistryService)context.getBean("testRegistryService"); // 获取远程服务代理  
          String hello = demoService.hello("sss"); // 执行远程方法  
          System.out.println(hello);  
    }
}
最近下载更多
Rommel  LV27 2021年10月12日
vinod1213  LV12 2021年9月13日
皮皮虾一月  LV8 2020年12月21日
liyiming  LV4 2020年8月6日
simple丶余心  LV21 2020年7月23日
280286951  LV17 2020年7月8日
kaqichen  LV16 2020年7月6日
hulewang  LV7 2020年5月29日
shenchong  LV19 2020年1月9日
yangxc  LV3 2019年12月16日
最近浏览更多
zgd_suny  LV7 2023年5月17日
liangge2115  LV27 2023年3月20日
bin2337  LV4 2022年9月22日
lwp011  LV27 2022年9月19日
LKBBDD  LV7 2022年6月2日
微信网友_5952843817488384  LV2 2022年5月10日
1145304128  LV12 2022年4月1日
denliv_hui  LV13 2022年2月11日
Rommel  LV27 2021年10月12日
huangxiaoke20  LV17 2021年7月19日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友