All Projects → teaey → Spring Boot Starter Dubbo

teaey / Spring Boot Starter Dubbo

Licence: apache-2.0
Dubbo Spring Boot 工程

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Spring Boot Starter Dubbo

Chronus
Chronus是360金融技术团队基于阿里开源项目TBSchedule重写的分布式调度。
Stars: ✭ 166 (-6.21%)
Mutual labels:  dubbo, spring-boot
Whatsmars
Java生态研究(Spring Boot + Redis + Dubbo + RocketMQ + Elasticsearch)🔥🔥🔥🔥🔥
Stars: ✭ 1,389 (+684.75%)
Mutual labels:  dubbo, spring-boot
Spring Boot Extend
在springboot基础上的扩展项目,快速集成Zookeeper、Dubbo、Apollo、Mybatis多数据源
Stars: ✭ 63 (-64.41%)
Mutual labels:  dubbo, spring-boot
Brpc Java
Java implementation for Baidu RPC, multi-protocol & high performance RPC.
Stars: ✭ 647 (+265.54%)
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 (+927.68%)
Mutual labels:  dubbo, spring-boot
Springbootexamples
Spring Boot 学习教程
Stars: ✭ 794 (+348.59%)
Mutual labels:  dubbo, spring-boot
Springboot Templates
springboot和dubbo、netty的集成,redis mongodb的nosql模板, kafka rocketmq rabbit的MQ模板, solr solrcloud elasticsearch查询引擎
Stars: ✭ 100 (-43.5%)
Mutual labels:  dubbo, spring-boot
Dis Seckill
👊SpringBoot+Zookeeper+Dubbo打造分布式高并发商品秒杀系统
Stars: ✭ 315 (+77.97%)
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 (+774.58%)
Mutual labels:  dubbo, spring-boot
Springboot Labs
一个涵盖六个专栏:Spring Boot 2.X、Spring Cloud、Spring Cloud Alibaba、Dubbo、分布式消息队列、分布式事务的仓库。希望胖友小手一抖,右上角来个 Star,感恩 1024
Stars: ✭ 12,804 (+7133.9%)
Mutual labels:  dubbo, spring-boot
Poplar
A social networking application written by React Native
Stars: ✭ 373 (+110.73%)
Mutual labels:  dubbo, spring-boot
Meetingfilm
基于微服务架构的在线电影购票平台
Stars: ✭ 149 (-15.82%)
Mutual labels:  dubbo, spring-boot
Spring Learning
🔥🔥🎉Spring Learning Project, Enjoy it
Stars: ✭ 367 (+107.34%)
Mutual labels:  dubbo, spring-boot
Dubbo Spring Boot Mybatis Redis
通过dubbo+spring boot+mybatis+redis等主流技术搭建成一套分布式服务框架
Stars: ✭ 889 (+402.26%)
Mutual labels:  dubbo, spring-boot
Ibase4j Springboot
Spring,SpringBoot,SpringMVC,Mybatis,mybatis-plus,motan/dubbo分布式,Redis缓存,Shiro权限管理,Spring-Session单点登录,Quartz分布式集群调度,Restful服务,QQ/微信登录,App token登录,微信/支付宝支付;日期转换、数据类型转换、序列化、汉字转拼音、身份证号码验证、数字转人民币、发送短信、发送邮件、加密解密、图片处理、excel导入导出、FTP/SFTP/fastDFS上传下载、二维码、XML读写、高精度计算、系统配置工具类等等。
Stars: ✭ 348 (+96.61%)
Mutual labels:  dubbo, spring-boot
Eshop Soa
EShop基于Dubbo实现SOA服务化拆分,并基于RocketMQ解决了分布式事务(新版SpringBootSOASkeleton)
Stars: ✭ 65 (-63.28%)
Mutual labels:  dubbo, spring-boot
Springboot Learning
《Spring Boot基础教程》,2.x版本持续连载中!点击下方链接直达教程目录!
Stars: ✭ 13,916 (+7762.15%)
Mutual labels:  dubbo, spring-boot
Spring Boot Dubbo
Spring Boot with Dubbo support
Stars: ✭ 289 (+63.28%)
Mutual labels:  dubbo, spring-boot
Superman
Superman是什么:构建Java 高级开发技术的知识体系,从基础不断打怪升级成为超人之路(更新中.......)
Stars: ✭ 106 (-40.11%)
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 (-25.99%)
Mutual labels:  dubbo, spring-boot

spring-boot-starter-dubbo

spring-boot-start-dubbo,让你可以使用spring-boot的方式开发dubbo程序。使dubbo开发变得如此简单。

让你可以使用spring-boot的方式开发dubbo程序。使dubbo开发变得如此简单。

如何使用

1. clone代码(可选,已经发布到中央仓库,可以直接依赖中央仓库的稳定版本

git clone [email protected]:teaey/spring-boot-starter-dubbo.git

2. 编译安装(可选)

cd spring-boot-starter-dubbo
mvn clean install

3. 修改maven配置文件(可以参考样例spring-boot-starter-dubbo-sample

  • spring boot项目的pom.xml增加parent:
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.3.6.RELEASE</version>
</parent>
  • spring boot项目的pom.xml中添加以下依赖:

根据实际情况依赖最新版本

 <dependency>
    <groupId>io.dubbo.springboot</groupId>
    <artifactId>spring-boot-starter-dubbo</artifactId>
    <version>1.0.0</version>
 </dependency>
  • maven插件用于打包成可执行的uber-jar文件,添加以下插件(这里一定要加载需要打包成jarmudulepom中)
<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <version>1.3.6.RELEASE</version>
</plugin>

4. 发布服务

服务接口:

package cn.teaey.sprintboot.test;

public interface EchoService {
    String echo(String str);
}

application.properties添加Dubbo的版本信息和客户端超时信息,如下:

spring.dubbo.application.name=provider
spring.dubbo.registry.address=zookeeper://192.168.99.100:32770
spring.dubbo.protocol.name=dubbo
spring.dubbo.protocol.port=20880
spring.dubbo.scan=cn.teaey.sprintboot.test

Spring Applicationapplication.properties中添加spring.dubbo.scan即可支持Dubbo服务发布,其中scan表示要扫描的package目录。

  • spring boot启动
package cn.teaey.sprintboot.test;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class Server {
    public static void main(String[] args) {
        SpringApplication.run(Server.class, args);
    }
}

  • 编写你的Dubbo服务,只需要添加要发布的服务实现上添加@Service,如下:
package cn.teaey.sprintboot.test;

import com.alibaba.dubbo.config.annotation.Service;

@Service(version = "1.0.0")
public class EchoServerImpl implements EchoService {

    public String echo(String str) {
        System.out.println(str);
        return str;
    }
}

5. 消费Dubbo服务

  • application.properties添加Dubbo的版本信息和客户端超时信息,如下:
spring.dubbo.application.name=consumer
spring.dubbo.registry.address=zookeeper://192.168.99.100:32770
spring.dubbo.scan=cn.teaey.sprintboot.test

Spring Applicationapplication.properties中添加spring.dubbo.scan即可支持Dubbo服务发布,其中scan表示要扫描的package目录。

  • spring boot启动
package cn.teaey.sprintboot.test;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class Client {
    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(Client.class, args);
        AbcService bean = run.getBean(AbcService.class);
        System.out.println(bean.echoService.echo("abccc"));
    }
}

  • 引用Dubbo服务,只需要添加要发布的服务实现上添加@Reference,如下:
package cn.teaey.sprintboot.test;

import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Component;

@Component
public class AbcService {
    @Reference(version = "1.0.0")
    public EchoService echoService;
}

6. monitor监控中心

  • application.properties添加monitor监控中心配置(服务端和消费端相同),如下:
spring.dubbo.monitor.protocol=registry

7. 打包

  • 可以直接执行Server或者Client启动
  • 可以通过mvn clean package打包成可执行的uber-jar文件
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].