Skip to content

dinbtechit/dropwizard-guicey

 
 

Repository files navigation

Dropwizard guice integration

License Build Status Appveyor build status codecov

DOCUMENTATION: http://xvik.github.io/dropwizard-guicey/

Additional repositories:

Support:

About

Dropwizard 1.1.0 guice (4.1.0, 4.2.0) integration. Compatible with dropwizard 1.3.0 (declare dropwizard manually in your project to override transitive version).

Ext jdbi module is not yet compatible with guice 4.2.0. Dropwizard 1.3.0 compatibility for ext modules will be checked soon. New release should be near April (approx.).

Originally inspired by dropwizard-guice and dropwizardy-guice (which was derived from first one).

Features:

  • Guice injector created on run phase
  • Compatible with guice restrictive options: disableCircularProxies, requireExactBindingAnnotations and requireExplicitBindings
  • Flexible HK2 integration
  • No base classes for application or guice module (only bundle registration required)
  • Configurable installers mechanism: each supported feature (task install, health check install, etc) has it's own installer and may be disabled
  • Custom feature installers could be added
  • Optional classpath scan to search features: resources, tasks, commands, health checks etc (without dependency on reflections library)
  • Injections works in commands (environment commands)
  • Support injection of Bootstrap, Environment and Configuration objects into guice modules before injector creation
  • Guice ServletModule can be used to bind servlets and filters for main context (may be disabled)
  • Dropwizard style reporting of installed extensions
  • Admin context rest emulation
  • Custom junit rule for lightweight integration testing
  • Spock extensions

Thanks to

Setup

Releases are published to bintray jcenter (package appear immediately after release) and then to maven central (require few days after release to be published).

JCenter Maven Central

May be used through extensions project BOM or directly.

Maven:

<dependency>
  <groupId>ru.vyarus</groupId>
  <artifactId>dropwizard-guicey</artifactId>
  <version>4.1.0</version>
</dependency>

Gradle:

compile 'ru.vyarus:dropwizard-guicey:4.1.0'
Dropwizard Guicey
1.1, 1.2 4.1.0
1.0 4.0.1
0.9 3.3.0
0.8 3.1.0
0.7 1.1.0

BOM

Guicey pom may be also used as maven BOM:

plugins {
    id "io.spring.dependency-management" version "1.0.2.RELEASE"
}
dependencyManagement {
    imports {
        mavenBom 'ru.vyarus.guicey:guicey:4.1.0'
    }
}

dependencies {
    compile 'ru.vyarus.guicey:guicey:4.1.0'
   
    // no need to specify versions
    compile 'io.dropwizard:dropwizard-auth'
    compile 'com.google.inject:guice-assistedinject'   
     
    testCompile 'io.dropwizard:dropwizard-test'
    testCompile 'org.spockframework:spock-core'
}

Bom includes:

  • Dropwizard BOM (io.dropwizard:dropwizard-bom)
  • Guice BOM (com.google.inject:guice-bom)
  • Hk bridge (org.glassfish.hk2:guice-bridge)
  • System rules, required for StartupErrorRule (com.github.stefanbirkner:system-rules)
  • Spock (org.spockframework:spock-core)

Guicey extensions project provide extended BOM with guicey and all guicey modules included. See extensions project BOM section for more details of BOM usage.

Snapshots

You can use snapshot versions through JitPack:

  • Go to JitPack project page
  • Select Commits section and click Get it on commit you want to use (top one - the most recent)
  • Follow displayed instruction: add repository and change dependency (NOTE: due to JitPack convention artifact group will be different)

Usage

Read documentation

Might also like


java lib generator

Packages

No packages published

Languages

  • Java 54.9%
  • Groovy 45.1%