Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/loveincode/dubbo-springboot
🤖 使用SpringBoot maven构建dubbo demo
https://github.com/loveincode/dubbo-springboot
dubbo maven springboot zookeeper
Last synced: about 1 month ago
JSON representation
🤖 使用SpringBoot maven构建dubbo demo
- Host: GitHub
- URL: https://github.com/loveincode/dubbo-springboot
- Owner: loveincode
- License: apache-2.0
- Created: 2018-06-27T12:45:23.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-29T08:57:13.000Z (over 6 years ago)
- Last Synced: 2024-11-06T05:42:35.808Z (3 months ago)
- Topics: dubbo, maven, springboot, zookeeper
- Language: Java
- Homepage: https://github.com/loveincode/Dubbo-SpringBoot-Demo
- Size: 16.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dubbo-SpringBoot-Demo
Dubbo-SpringBoot-Demo
使用SpringBoot maven构建dubbo demo### 项目安装
1. 首先安装zookeeper;[Zookeeper 安装教程](https://www.w3cschool.cn/zookeeper/zookeeper_installation.html);
2. 将项目导入eclipse;
3. `dubbo-provider`服务提供者项目的资源文件 src/main/resources/provides.xml下配置zookeeper地址;
4. `dubbo-consumer`服务提供者项目的资源文件 src/main/resources/consumer.xml下配置zookeeper地址;
5. 启动`dubbo-provider`项目下的`ProviderApplication`注册服务提供者;
6. 启动`dubbo-consumer`项目下的`ConsumerApplication`注册服务消费者;
7. 整个项目即可完整运行,浏览器访问 http://localhost:8088/user/sayHello/loveincode 验证效果。
### 多提供者模拟
1. 操作上面的 1 - 6
2. 修改`dubbo-provider`服务提供者项目下`UserServiceImpl`,修改打印语句 node;
3. 修改`dubbo-provider`服务提供者项目的资源文件 src/main/resources/application.properties下配置server.port端口地址,与之前的不重复;
4. 重复启动dubbo-provider项目下的`ProviderApplication`注册服务提供者,可多启动几个提供者;
5. 浏览器访问 http://localhost:8088/user/sayHello/loveincode 验证效果,多次访问会调用了不同的提供者,查看多个提供者的后台打印测试验证。