To mvn clean install
this project, you must have jdk8 installed.
- Expose spring managed beans as http endpoints , especially useful for testing dubbo services.
- A
Service
can be marked as exposable byServiceFilter
. - The endpoint url can be customised by
UrlGenerator
.
Can expose bean methods with zero or one arg.Multi args are supported now.- Does not support bean method overloading unless a custom
UrlGenerator
is provided to ensure each overloaded method having a different url from each other. - Method arguments are sent from request body (As with
@RequestBody
)
See the test
module.
To integrate with your existing spring mvc project , just add life.xiaoyuan.xdubbo
to your <component-scan/>
git clone https://github.com/Youmoo/xdubbo.git
cd xdubbo
mvn clean install -DskipTests -Dskip
cd test
mvn spring-boot:run
The Service
below will be exposed as:
- '/service/find'
- 'service/update'
- '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";
}
}
XDubbo is released under version 2.0 of the Apache License.