Skip to content

wacai/dropwizard-dubbo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

mvn clean install
<dependency>
  <groupId>com.wacai</groupId>
  <artifactId>dropwizard-dubbo</artifactId>
  <version>0.1.0-SNAPSHOT</version>
</dependency>

<!-- Optional -->
<dependency>
    <groupId>redis.clients</groupId>
    <artifactId>jedis</artifactId>
    <version>2.1.0</version>
</dependency>

Usage

public class YourConfiguration extends Configuration {
  @JsonProperty("dubbo")
  private ServiceProvider serviceProvider = new ServiceProvider();

  public ServiceProvider getServiceProvider() { return serviceProvider; }

}

public class YourApplication extends Application {

  @Override
  public void run(ManagementConfiguration conf, Environment environment) throws Exception {
    YourService ys = conf.getServiceProvider.provide(YourService.class, environment);
  }

}

Configuration

dubbo:
  application:
    name: your_application
  registries:
    - address: dubbo.registry:12306
      protocol: redis
      check: false
      timeoutMillis: 5000
  consumer:
    check: false
    timeoutMillis: 5000

About

Dubbo integration for dropwizard

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages