Thanks to visit codestin.com
Credit goes to github.com

Skip to content

zylele/dubbox-boot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dubbox-boot

dubbox-boot

dubbox-boot是一个基于Dubbox、SpringBoot,迅速构建启动的dubbox项目

各工程:

  • base-common 接口与实体类定义,在消费者与提供者共享

  • base-config dubbo、数据库、缓存、等等的配置管理,被各个服务提供者依赖

  • base-consumer 消费者示例

  • base-dynamic-service 提供者示例("动态"服务)

  • base-user-service 提供者示例("用户"服务)

dubbox-demo包含哪些功能

  • 服务提供者示例
  • 服务消费者示例
  • 数据库、缓存、dubbo配置管理

准备

建议在maven安装目录下的conf\settings.xml<mirrors>标签中添加如下镜像,以提高maven打包速度

<mirror>
    <id>alimaven</id>
    <name>aliyun maven</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
    <mirrorOf>central</mirrorOf>
</mirror>

下载dubbox源码并且编译:

git clone [email protected]:dangdangdotcom/dubbox.git 执行maven命令mvn clean install -Dmaven.test.skip

快速启动

  • 下载源码git clone [email protected]:zylele/dubbox-demo.git

  • 生成eclipse项目mvn eclipse:eclipse

  • 导入eclipse

  • 执行初始化init.sql

  • 启动ZooKeeper

  • 启动提供者UserServiceProviderDynamicServiceProvider

  • 启动消费者BaseConsumer

  • 访问http://localhost:1000/user/get/{1,2,3}http://localhost:1000/dynamic/get/{1,2,3}

服务主要配置详情请点击我的博文dubbox快速指南


dubbox还具有相当多的配置功能,如负载均衡、集群容错,多协议、多注册中心等

更多示例与参考手册,可查看dubbo用户指南

About

dubbox指南

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages