Coder Social home page Coder Social logo

spring-boot-starter-motan's Introduction

spring boot motan

License

GitHub下载
码云下载

项目介绍

基于spring boot motan 整合demo(支持异步和同步调用),motan配置信息存放在application.yml中,详细配置请参考官网配置清单 此demo基于zookeeper 注册中心,如果要直接启动,需要安装zookeeper,也可以更改为其他注册中心测试

项目结构

spring-boot-starter-motan
├── fallsea-motan-client -- 客户端通用配置
├── fallsea-motan-server -- 服务端通用配置
├── fallsea-motan-demo -- demo 示例
|    ├── fallsea-motan-api-demo -- api 示例
|    ├── fallsea-motan-client-demo -- 客户端调用示例
|    ├── fallsea-motan-server-demo -- 服务端示例

服务端

启动类 MotanServer
配置说明,详细配置请参考官网配置清单

fallsea :
    motan :
        #注册中心配置
        registry :
            regProtocol : zookeeper #注册中心协议
            address : 127.0.0.1:2181 #注册中心地址
            requestTimeout : 1000 #注册中心连接超时时间(毫秒)
            connectTimeout : 3000 #注册中心请求超时时间(毫秒)
        #协议配置
        protocol :
            name : motan #协议名称
            minWorkerThread : 20 #最小工作pool线程数
            maxWorkerThread : 50 #最大工作pool线程数
            filter : statistic
        #指定需要解析的包名
        annotation :
            package : com.fallsea.demo
        #服务端配置
        server :
            export :  'fallseaMotan:9999' #服务端口
            group : fallsea
            registry : fallseaRegistryConfig

客户端

启动类 MotanClientWeb
客户端测试地址:http://localhost:8080/hello/fallsea
配置说明,详细配置请参考配置清单

fallsea :
    motan :
        #注册中心配置
        registry :
            regProtocol : zookeeper #注册中心协议
            address : 127.0.0.1:2181 #注册中心地址
            requestTimeout : 1000 #注册中心连接超时时间(毫秒)
            connectTimeout : 3000 #注册中心请求超时时间(毫秒)
        #协议配置
        protocol :
            name : motan #协议名称
            minWorkerThread : 20 #最小工作pool线程数
            maxWorkerThread : 50 #最大工作pool线程数
            filter : statistic
        #指定需要解析的包名
        annotation :
            package : com.fallsea.demo
        #客户端配置
        client :
            protocol : fallseaMotan
            group : fallsea
            check : false
            requestTimeout : 3000 #请求超时时间(毫秒)
            connectTimeout : 5000 #连接超时时间(毫秒)
            registry : fallseaRegistryConfig

spring-boot-starter-motan's People

Contributors

fallsea avatar

Watchers

tangluobo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.