Dropwizard-guicey extensions
IMPORTANT Modules were moved into the core repository
in order to unify versions and release cycles (for guicey 6, dropwizard 3 and beyond)
Dropwizard-guicey 5.x extensions and integrations.
Provided modules may be used directly and for educational purposes (as examples for custom integrations).
NOTE: Extension modules version is derived from guicey version: guiceyVersion-Number
(the same convention as for dropwizard modules). For example version 5.0.0-1 means
first extensions release (1) for guicey 5.0.0.
Also, guicey base package ru.vyarus.dropwizard.guice
is different from extensions base package ru.vyarus.guicey
.
Older versions:
You can either use modules directly (in this case see module page for setup) or use provided BOM
to unify versions management.
Provides:
Maven:
<!-- Implicitly imports Dropwizard and Guice BOMs -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>ru.vyarus.guicey</groupId>
<artifactId>guicey-bom</artifactId>
<version>5.7.1-1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- uncomment to override dropwizard and its dependencies versions
<dependency>
<groupId>io.dropwizard/groupId>
<artifactId>dropwizard-dependencies</artifactId>
<version>2.1.5</version>
<type>pom</type>
<scope>import</scope>
</dependency> -->
</dependencies>
</dependencyManagement>
<!-- declare guice and ext modules without versions -->
<dependencies>
<dependency>
<groupId>ru.vyarus</groupId>
<artifactId>dropwizard-guicey</artifactId>
</dependency>
<!-- For example, using dropwizard module (without version) -->
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-auth</artifactId>
</dependency>
<!-- Example of extension module usage -->
<dependency>
<groupId>ru.vyarus.guicey</groupId>
<artifactId>guicey-eventbus</artifactId>
</dependency>
</dependencies>
Gradle:
dependencies {
implementation platform('ru.vyarus.guicey:guicey-bom:5.7.1-1')
// uncomment to override dropwizard and its dependencies versions
//implementation platform('io.dropwizard:dropwizard-dependencies:2.1.5')
// declare guice and ext modules without versions
implementation 'ru.vyarus:dropwizard-guicey'
implementation 'io.dropwizard:dropwizard-auth'
implementation 'ru.vyarus.guicey:guicey-eventbus'
}
You may override BOM version for any dependency by simply specifying exact version in dependency declaration section.
If you want to use newer version (then provided by guicey BOM) of dropwizard or guice then import also their BOMs directly:
io.dropwizard
$VERSION
for dropwizardcom.google.inject
$VERSION
for guicegroovy
repositories { maven { url 'https://jitpack.io' } }
groovy
dependencyManagement {
resolutionStrategy {
cacheChangingModulesFor 0, 'seconds'
}
imports {
mavenBom "ru.vyarus.guicey:guicey-bom:COMMIT-HASH"
}
}
dependencies {
implementation 'ru.vyarus.guicey:guicey-validation'
}
groovy
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
dependencies {
implementation 'ru.vyarus.guicey:guicey-validation:COMMIT-HASH'
}
resolutionStrategy
setting required for correct updating snapshot with recent commitsCommits
section and click Get it
on commit you want to use andru.vyarus.guicey:guicey-bom:8585300d12
xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>ru.vyarus.guicey</groupId>
<artifactId>guicey-bom</artifactId>
<version>COMMIT-HASH</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>ru.vyarus.guicey</groupId>
<artifactId>guicey-validation</artifactId>
</dependency>
</dependencies>
Admin context rest support (mirror main rest).
Support for @PostConstruct, @PreDestroy, @PostStartup annotations on guice beans.
Allows using validation annotations on any guice bean method (the same way as dropwizard rest validation)
Module provides integration with Guava EventBus: automates subscriptions, report events with subscriptions and registers EventBus for inject.
Based on dropwizard integration. Introduce thread bound transactions, defined with annotations.
Sql proxies could be used as usual guice beans without extra efforts to use them in the same transaction.
Jdbi3 integration, based on dropwizard module. Introduce thread bound transactions, defined with annotations.
Sql proxies could be used as usual guice beans without extra efforts to use them in the same transaction.
Correct redirect to index page for html5 client routing urls (e.g. html5 routing enabled by default in Angular 2).
JSP like simplicity for dropwizard-views.
JUnit 4 rules.
Spock 1 extensions.