Giter Club home page Giter Club logo

xdubbo's Introduction

xdubbo

To mvn clean install this project, you must have jdk8 installed.

Features

  1. Expose spring managed beans as http endpoints , especially useful for testing dubbo services.
  2. A Service can be marked as exposable by ServiceFilter.
  3. The endpoint url can be customised by UrlGenerator.

Limitations

  1. Can expose bean methods with zero or one arg. Multi args are supported now.
  2. Does not support bean method overloading unless a custom UrlGenerator is provided to ensure each overloaded method having a different url from each other.
  3. Method arguments are sent from request body (As with @RequestBody)

Usage

See the test module.

Download Postman test data

To integrate with your existing spring mvc project , just add life.xiaoyuan.xdubbo to your <component-scan/>

Test

git clone https://github.com/Youmoo/xdubbo.git
cd xdubbo
mvn clean install -DskipTests -Dskip
cd test
mvn spring-boot:run

Explanation

The Service below will be exposed as:

  1. '/service/find'
  2. 'service/update'
  3. 'service/findAll'
@Component
public class Service {

    public User find(Integer id) {
        User user = new User();
        user.setId(id);
        user.setUsername("youmoo");
        return user;
    }

    public User update(User user) {
        return user;
    }

    String findAll() {
        return "findAll";
    }

}

License

XDubbo is released under version 2.0 of the Apache License.

xdubbo's People

Contributors

youmoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

xiexingguang

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.