All Projects → linux-china → Spring Boot Dubbo

linux-china / Spring Boot Dubbo

Spring Boot with Dubbo support

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Spring Boot Dubbo

Superman
Superman是什么:构建Java 高级开发技术的知识体系,从基础不断打怪升级成为超人之路(更新中.......)
Stars: ✭ 106 (-63.32%)
Mutual labels:  dubbo, spring-boot
Xc Spring Cloud Alibaba
spring cloud alibaba(2.2.1最新版)+nacos+dubbo+gateWay+sentinel+rocketmq+(pgsql/mysql8.0的json支持)+ignite集成可用于docker分布式框架+分布式自动化任务+mybatis多数据源+seate+ shardingSphere分布式分库事务解决方案
Stars: ✭ 131 (-54.67%)
Mutual labels:  dubbo, spring-boot
Springboot Labs
一个涵盖六个专栏:Spring Boot 2.X、Spring Cloud、Spring Cloud Alibaba、Dubbo、分布式消息队列、分布式事务的仓库。希望胖友小手一抖,右上角来个 Star,感恩 1024
Stars: ✭ 12,804 (+4330.45%)
Mutual labels:  dubbo, spring-boot
Eshop Soa
EShop基于Dubbo实现SOA服务化拆分,并基于RocketMQ解决了分布式事务(新版SpringBootSOASkeleton)
Stars: ✭ 65 (-77.51%)
Mutual labels:  dubbo, spring-boot
Spring Boot Starter Dubbo
Dubbo Spring Boot 工程
Stars: ✭ 177 (-38.75%)
Mutual labels:  dubbo, spring-boot
Springboot Templates
springboot和dubbo、netty的集成,redis mongodb的nosql模板, kafka rocketmq rabbit的MQ模板, solr solrcloud elasticsearch查询引擎
Stars: ✭ 100 (-65.4%)
Mutual labels:  dubbo, spring-boot
Spring Boot Quick
🌿 基于springboot的快速学习示例,整合自己遇到的开源框架,如:rabbitmq(延迟队列)、Kafka、jpa、redies、oauth2、swagger、jsp、docker、spring-batch、异常处理、日志输出、多模块开发、多环境打包、缓存cache、爬虫、jwt、GraphQL、dubbo、zookeeper和Async等等📌
Stars: ✭ 1,819 (+529.41%)
Mutual labels:  dubbo, spring-boot
Brpc Java
Java implementation for Baidu RPC, multi-protocol & high performance RPC.
Stars: ✭ 647 (+123.88%)
Mutual labels:  dubbo, spring-boot
Chronus
Chronus是360金融技术团队基于阿里开源项目TBSchedule重写的分布式调度。
Stars: ✭ 166 (-42.56%)
Mutual labels:  dubbo, spring-boot
Spring Cloud Dubbo Together
Spring Cloud与Dubbo共存方案
Stars: ✭ 155 (-46.37%)
Mutual labels:  dubbo, spring-boot
Spring Boot Extend
在springboot基础上的扩展项目,快速集成Zookeeper、Dubbo、Apollo、Mybatis多数据源
Stars: ✭ 63 (-78.2%)
Mutual labels:  dubbo, spring-boot
Spring Boot Sample
Spring-boot 集成druid数据库连接池,Spring-boot实现druid的动态数据源,Spring-boot实现定时任务schedule,spring-boot集成mybatis
Stars: ✭ 180 (-37.72%)
Mutual labels:  dubbo, spring-boot
Dubbo Spring Boot Mybatis Redis
通过dubbo+spring boot+mybatis+redis等主流技术搭建成一套分布式服务框架
Stars: ✭ 889 (+207.61%)
Mutual labels:  dubbo, spring-boot
Whatsmars
Java生态研究(Spring Boot + Redis + Dubbo + RocketMQ + Elasticsearch)🔥🔥🔥🔥🔥
Stars: ✭ 1,389 (+380.62%)
Mutual labels:  dubbo, spring-boot
Springbootexamples
Spring Boot 学习教程
Stars: ✭ 794 (+174.74%)
Mutual labels:  dubbo, spring-boot
Ibase4j
Spring,SpringBoot 2.0,SpringMVC,Mybatis,mybatis-plus,motan/dubbo分布式,Redis缓存,Shiro权限管理,Spring-Session单点登录,Quartz分布式集群调度,Restful服务,QQ/微信登录,App token登录,微信/支付宝支付;日期转换、数据类型转换、序列化、汉字转拼音、身份证号码验证、数字转人民币、发送短信、发送邮件、加密解密、图片处理、excel导入导出、FTP/SFTP/fastDFS上传下载、二维码、XML读写、高精度计算、系统配置工具类等等。
Stars: ✭ 1,548 (+435.64%)
Mutual labels:  dubbo, spring-boot
Spring Learning
🔥🔥🎉Spring Learning Project, Enjoy it
Stars: ✭ 367 (+26.99%)
Mutual labels:  dubbo, spring-boot
Poplar
A social networking application written by React Native
Stars: ✭ 373 (+29.07%)
Mutual labels:  dubbo, spring-boot
Meetingfilm
基于微服务架构的在线电影购票平台
Stars: ✭ 149 (-48.44%)
Mutual labels:  dubbo, spring-boot
Dubbo Spring Boot Starter
Dubbo Spring Boot Starter
Stars: ✭ 2,102 (+627.34%)
Mutual labels:  dubbo, spring-boot

Spring Boot With Dubbo

主要介绍如何在Spring Boot中整合Dubbo的使用.

注意事项

由于Dubbo的版本并不是特别活跃,加上和Spring Boot的jar包适配等问题,所以请使用最新的Dubbo 3.0.0-SNAPSHOT版本, 目前还有很多工作调整 地址为: https://github.com/linux-china/dubbo3

注册中心(Registry)

目前主要是支持Redis、ZooKeeper和Consul这三个注册中心,主要是这两个服务非常普遍,同时由于Docker的流行,启动这三者个服务也非常简单。

Redis

使用Redis注册中心,需要将在pom.xml中添加对应的redis客户端,代码如下:

     <dependency>
         <groupId>redis.clients</groupId>
         <artifactId>jedis</artifactId>
     </dependency>

对应的配置项为: spring.dubbo.registry = redis://localhost:6379

ZooKeeper

使用ZooKeeper注册中心,需要在pom.xml中添加zookeeper需要的jar包,代码如下:

     <dependency>
         <groupId>org.apache.curator</groupId>
         <artifactId>curator-framework</artifactId>
         <version>2.12.0</version>
     </dependency>
     <dependency>
         <groupId>com.101tec</groupId>
         <artifactId>zkclient</artifactId>
         <version>0.10</version>
     </dependency>

对应的配置项为: spring.dubbo.registry = zookeeper://127.0.0.1:2181

多个zookeeper的配置项为: spring.dubbo.registry = zookeeper://192.168.0.2:2181,192.168.0.3:2181

如何测试

  • 首先使用IntelliJ IDEA导入项目
  • 调用docker-compose启动对应的注册中心: docker-compose up -d
  • 启动 SpringBootDubboServerApplication
  • 启动 SpringBootDubboClientApplication
  • 打开浏览器访问 http://localhost:2080

在 Docker 中运行

  • 调用docker-compose启动对应的注册中心: docker-compose up -d
  • 编译工程 mvn clean package -Dmaven.test.skip
  • 将 server 打包成 docker image : docker build -t dubbo-demo:latest spring-boot-dubbo-server
  • 运行 server (注意修改环境变量) : docker run --rm --name=dubbo-demo -p 20890:20880 -e EXPORT_PORT=20890 -e EXPORT_HOST=YOUR_HOST_HERE -e ZK_HOST=YOUR_HOST_HERE dubbo-demo
  • 启动 SpringBootDubboClientApplication
  • 打开浏览器访问 http://localhost:2080

Spring DevTools注意事项

由于Spring DevTools采用不一样的classloader的机制,所以会导致Dubbo Consumer Bean无法赋值到指定的@Component上,请使用以下规则:

在 src/main/resources/META-INF/spring-devtools.properties 在添加以下代码进行DevTools的classloader屏蔽:

restart.exclude.target-classes=/target/classes/

关于hotspot的模式下,相关Java代码调整后理解生效,可以考虑: http://dcevm.github.io/

如果你的应用是纯Dubbo服务,没有涉及到Web页面,不建议你添加spring-devtools,如果添加了后, 可以通过以下配置项关闭livereload服务,这样可以保证不必要的live reload服务启动。

spring.devtools.livereload.enabled=false

todo

Spring Boot集成

请参看 spring-boot-starter-dubbo

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].