package com.dubbotest;
import java.util.List;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* 消费者
* @author chase
*
*/
public class Consumer {
public static void main(String[] args) throws Exception {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
new String[] { "spring-web.xml" });
context.start();
DemoService demoService = (DemoService) context.getBean("demoService");
String hello = demoService.sayHello("hejingyuan");
System.out.println(hello);
List list = demoService.getUsers();
if (list != null && list.size() > 0) {
for (int i = 0; i < list.size(); i++) {
System.out.println(list.get(i));
}
}
System.in.read();
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
dubbo完整案例,包含服务方和消费方完整代码 (127个子文件)
Consumer.class 2KB
DemoServiceImpl.class 1KB
DemoServiceImpl.class 1KB
User.class 918B
User.class 918B
User.class 918B
Provider.class 833B
Provider.class 833B
DemoService.class 217B
DemoService.class 217B
DemoService.class 217B
.classpath 1KB
.classpath 1KB
org.eclipse.wst.common.component 674B
org.eclipse.wst.common.component 644B
org.eclipse.wst.jsdt.ui.superType.container 49B
org.eclipse.wst.jsdt.ui.superType.container 49B
aspectjweaver-1.6.12.jar 1.67MB
dubbo-2.5.3.jar 1.3MB
ehcache-core-2.5.0.jar 1.15MB
spring-context-4.3.9.RELEASE.jar 1.09MB
spring-core-4.3.9.RELEASE.jar 1.07MB
mysql-connector-java-5.1.35.jar 946KB
spring-webmvc-4.3.9.RELEASE.jar 894KB
spring-web-4.3.9.RELEASE.jar 801KB
netty-3.2.5.Final.jar 774KB
spring-beans-4.3.9.RELEASE.jar 745KB
mybatis-3.2.8.jar 697KB
javassist-3.15.0-GA.jar 633KB
zookeeper-3.3.6.jar 594KB
spring-test-4.3.9.RELEASE.jar 586KB
log4j-1.2.17.jar 478KB
spring-orm-4.3.9.RELEASE.jar 466KB
spring-jdbc-4.3.9.RELEASE.jar 418KB
fastjson-1.2.7.jar 407KB
jstl-1.2.jar 405KB
spring-aop-4.3.9.RELEASE.jar 372KB
shiro-core-1.2.2.jar 358KB
cglib-2.2.2.jar 280KB
spring-tx-4.3.9.RELEASE.jar 261KB
spring-expression-4.3.9.RELEASE.jar 257KB
commons-beanutils-1.8.3.jar 227KB
commons-io-2.2.jar 170KB
commons-dbcp-1.4.jar 157KB
shiro-web-1.2.2.jar 139KB
aspectjrt-1.6.12.jar 113KB
commons-pool-1.5.4.jar 94KB
jline-0.9.94.jar 85KB
zkclient-0.10.jar 73KB
commons-fileupload-1.3.1.jar 67KB
zkclient-0.1.jar 61KB
mybatis-spring-1.2.3.jar 50KB
asm-3.3.1.jar 43KB
slf4j-api-1.7.6.jar 28KB
shiro-spring-1.2.2.jar 24KB
jcl-over-slf4j-1.7.6.jar 16KB
shiro-ehcache-1.2.2.jar 15KB
slf4j-log4j12-1.7.6.jar 9KB
Consumer.java 770B
DemoServiceImpl.java 622B
User.java 460B
User.java 460B
Provider.java 457B
DemoService.java 150B
DemoService.java 150B
.jsdtscope 639B
.jsdtscope 639B
index.jsp 374B
index.jsp 374B
index.jsp 374B
inputFiles.lst 246B
createdFiles.lst 0B
MANIFEST.MF 107B
MANIFEST.MF 107B
org.eclipse.wst.jsdt.ui.superType.name 6B
org.eclipse.wst.jsdt.ui.superType.name 6B
org.eclipse.jdt.core.prefs 478B
org.eclipse.jdt.core.prefs 478B
org.eclipse.m2e.core.prefs 90B
org.eclipse.m2e.core.prefs 90B
org.eclipse.wst.validation.prefs 50B
org.eclipse.wst.validation.prefs 50B
.project 1KB
.project 1KB
log4j.properties 3KB
log4j.properties 3KB
log4j.properties 3KB
log4j.properties 3KB
log4j.properties 3KB
pom.properties 218B
pom.properties 212B
pom.properties 111B
dubbo.properties 52B
dubbo.properties 52B
dubbo.properties 52B
dubbo.properties 52B
dubbo.properties 52B
dubbotest.war 17.76MB
pom.xml 7KB
pom.xml 7KB
共 127 条
- 1
- 2
资源评论
- xiao_hai16012019-05-10正在研究....
LZMLZMLZM268
- 粉丝: 2
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功