com.englishtown.vertx:vertx-guice

Provides a VerticleFactory that uses Guice for dependency injection.

License

License

Categories

Categories

GUI User Interface Guice Application Layer Libs Dependency Injection
GroupId

GroupId

com.englishtown.vertx
ArtifactId

ArtifactId

vertx-guice
Last Version

Last Version

2.3.1
Release Date

Release Date

Type

Type

jar
Description

Description

Provides a VerticleFactory that uses Guice for dependency injection.
Project URL

Project URL

https://github.com/englishtown/vertx-guice
Project Organization

Project Organization

Englishtown

Download vertx-guice

How to add to project

<!-- https://jarcasting.com/artifacts/com.englishtown.vertx/vertx-guice/ -->
<dependency>
    <groupId>com.englishtown.vertx</groupId>
    <artifactId>vertx-guice</artifactId>
    <version>2.3.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.englishtown.vertx/vertx-guice/
implementation 'com.englishtown.vertx:vertx-guice:2.3.1'
// https://jarcasting.com/artifacts/com.englishtown.vertx/vertx-guice/
implementation ("com.englishtown.vertx:vertx-guice:2.3.1")
'com.englishtown.vertx:vertx-guice:jar:2.3.1'
<dependency org="com.englishtown.vertx" name="vertx-guice" rev="2.3.1">
  <artifact name="vertx-guice" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.englishtown.vertx', module='vertx-guice', version='2.3.1')
)
libraryDependencies += "com.englishtown.vertx" % "vertx-guice" % "2.3.1"
[com.englishtown.vertx/vertx-guice "2.3.1"]

Dependencies

compile (2)

Group / Artifact Type Version
com.google.inject : guice jar 4.1.0
io.vertx : vertx-core jar 3.3.0

test (3)

Group / Artifact Type Version
org.mockito : mockito-core jar 1.10.19
junit : junit jar 4.12
io.vertx : vertx-core test-jar 3.3.0

Project Modules

There are no modules declared in this project.

Vert.x Guice Extensions

Enable Verticle dependency injection using Guice. Deploy your verticle with the java-guice: prefix to use the GuiceVerticleFactory.

Build Status Maven Central

License

http://englishtown.mit-license.org/

Configuration

Either provide a com.englishtown.vertx.guice.BootstrapBinder that implements com.google.inject.Module, or via vert.x config, provide a custom class name.

{
    "guice_binder": "my.custom.bootstrap.Binder"
}

Example

package com.englishtown.vertx.guice;

import com.englishtown.configuration.ConfigValueManager;
import com.englishtown.configuration.OtherBinder1;
import com.englishtown.configuration.OtherBinder2;
import com.englishtown.configuration.impl.PropertiesConfigValueManager;
import com.google.inject.AbstractModule;

import javax.inject.Singleton;

public class BootstrapBinder extends AbstractModule {

    @Override
    protected void configure() {

        // Configure bindings
        bind(ConfigValueManager.class).to(PropertiesConfigValueManager.class).in(Singleton.class);

        // Install other binders
        install(new OtherBinder1(), new OtherBinder2());

    }

}
com.englishtown.vertx

Labs @ EF Education First

Repositories moving to https://github.com/ef-labs

Versions

Version
2.3.1
2.3.0
2.2.0
2.1.0
2.0.0
2.0.0-RC5
2.0.0-RC4
2.0.0-RC3
2.0.0-RC2
2.0.0-RC1