Exemplo n.º 1
0
  @Override
  protected void configure() {
    DatabaseConfiguration c = getConfiguration();
    bindConstant()
        .annotatedWith(Names.named(DatabaseConnector.NAMESPACE_PARAM))
        .to(c.getNamespace());
    bindConstant()
        .annotatedWith(Names.named(DatabaseConnector.DATABASE_URL_PARAM))
        .to(c.getDatabaseUrl());

    bind(DatabaseConnector.class).to(MongoConnector.class);
  }