• Stars
    star
    227
  • Rank 169,478 (Top 4 %)
  • Language
    Java
  • License
    MIT License
  • Created over 9 years ago
  • Updated 26 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Dropwizard guice integration

Dropwizard guice integration

License CI Appveyor build status codecov

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

Support: discussions | gitter chat

About

Dropwizard 4.0.1 guice 7.0.0 integration.

Features:

  • Auto configuration from classpath scan and guice bindings.
  • Yaml config values bindings by path or unique sub objects.
  • Advanced Web support
  • Dropwizard style console reporting: detected (and installed) extensions are printed to console to remove uncertainty
  • Test support: custom junit and spock extensions
  • Advanced test abilities to disable or override application logic
  • Developer friendly:
    • core integrations may be replaced (to better fit needs)
    • rich api for developing custom integrations, and hooking into lifecycle)
    • out of the box support for plug-n-play plugins (auto discoverable)
    • diagnostic tools (reports), support for custom diagnostic tools

Sponsors

Β Β Β Β Channel

If guicey makes your life easier, you can support its development.

Supported versions

Due to 3 major changes in dropwizard recently, 3 guicey versions supported:

Dropwizard Guicey Reason
2.1.x 5.x Last java 8 compatible version
3.x 6.x Changed core dropwizard packages - old 3rd paty bundles would be incompatible
4.x 7.x Jakarta namespace migration - 3rd party guice modules might be incompatible

All branches use the same project structure: core guicey merged with extension modules. It greatly simplifies releases and keeps actual examples in one branch.

Upcoming guicey changes would be ported in all 3 branches.

Setup

Maven Central

Maven:

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

Gradle:

implementation 'ru.vyarus:dropwizard-guicey:7.0.1'
Dropwizard Guicey
4.0 7.0.1
3.0 6.1.1
2.1 5.9.1
2.0 5.5.0
1.3 4.2.3
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

Use BOM for guice, dropwizard and guicey modules dependency management. BOM usage is highly recommended as it allows you to correctly update dropwizard dependencies.

Gradle:

dependencies {
    implementation platform('ru.vyarus.guicey:guicey-bom:7.0.1')
    // uncomment to override dropwizard and its dependencies versions    
    //implementation platform('io.dropwizard:dropwizard-dependencies:4.0.1')

    // no need to specify versions
    implementation 'ru.vyarus:dropwizard-guicey'
    implementation 'ru.vyarus.guicey:guicey-eventbus'
   
    implementation 'io.dropwizard:dropwizard-auth'
    implementation 'com.google.inject:guice-assistedinject'   
    
    testImplementation 'io.dropwizard:dropwizard-test'
}

Maven:

<dependencyManagement>  
    <dependencies>
        <dependency>
            <groupId>ru.vyarus.guicey</groupId>
            <artifactId>guicey-bom</artifactId>
            <version>7.0.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>4.0.1</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency> -->                 
    </dependencies>
</dependencyManagement>

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

BOM includes:

BOM Artifact
Guicey modules ru.vyarus.guicey:guicey-[module]
Dropwizard BOM io.dropwizard:dropwizard-bom
Guice BOM com.google.inject:guice-bom
HK2 bridge org.glassfish.hk2:guice-bridge
Spock-junit5 ru.vyarus:spock-junit5

Snapshots

Snapshots may be used through JitPack

Add JitPack repository:

repositories { maven { url 'https://jitpack.io' } }

For spring dependencies plugin (when guicey pom used as BOM):

dependencyManagement {
    resolutionStrategy {
        cacheChangingModulesFor 0, 'seconds'
    }
    imports {
        mavenBom "ru.vyarus:dropwizard-guicey:master-SNAPSHOT"
    }
}

For direct guicey dependency:

configurations.all {
    resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}

dependencies {
    implementation 'ru.vyarus:dropwizard-guicey:master-SNAPSHOT'
}

Note that in both cases resolutionStrategy setting required for correct updating snapshot with recent commits (without it you will not always have up-to-date snapshot)

OR you can depend on exact commit:

  • Go to JitPack project page
  • Select Commits section and click Get it on commit you want to use and use commit hash as version: ru.vyarus:dropwizard-guicey:56537f7d23

Maven:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>  

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>ru.vyarus</groupId>
            <artifactId>dropwizard-guicey</artifactId>
            <version>master-SNAPSHOT</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

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

Or simply change version if used as direct dependency (repository must be also added):

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

Usage

Read documentation

Might also like


java lib generator

More Repositories

1

gradle-quality-plugin

Gradle quality plugin for Java and Groovy
Groovy
131
star
2

gradle-use-python-plugin

Use python modules in gradle build
Groovy
68
star
3

gradle-animalsniffer-plugin

Gradle AnimalSniffer plugin
Groovy
51
star
4

generics-resolver

Java generics runtime resolver
Java
45
star
5

generator-lib-java

Yeoman generator for java library
JavaScript
41
star
6

gradle-mkdocs-plugin

Mkdocs documentation generation and publishing plugin
Groovy
38
star
7

guice-validator

Guice javax.validation method validation integration
Java
37
star
8

gradle-pom-plugin

Gradle POM plugin
Groovy
35
star
9

guice-persist-orient

Guice integartion for OrientDB
Java
34
star
10

guice-ext-annotations

Guice annotations extensions
Java
22
star
11

dropwizard-guicey-examples

Dropwizard guicey examples
Java
19
star
12

gradle-java-lib-plugin

Gradle maven publishing configuration for Java or Groovy library or gradle plugin
Groovy
18
star
13

dropwizard-orient-server

Embedded OrientDB server for dropwizard
Java
16
star
14

dropwizard-guicey-ext

Dropwizard-guicey extensions
Java
14
star
15

gradle-github-info-plugin

Gradle Github info plugin
Groovy
12
star
16

yaml-updater

Yaml configuration merge tool
Java
10
star
17

generator-gradle-plugin

Yeoman generator for gradle plugin
JavaScript
10
star
18

spock-junit5

Junit 5 extensions support for Spock Framework 2
Java
7
star
19

slush-lib-java

Slush generator for java library
XSLT
4
star
20

windofburi

Wind of Buri music web player
JavaScript
2
star
21

guice-persist-orient-examples

Examples repository for guice-persist-orient
Java
1
star
22

yo-java-helper

Yeoman helper for Java generators
JavaScript
1
star