All Projects → xvik → dropwizard-guicey-ext

xvik / dropwizard-guicey-ext

Licence: MIT license
Dropwizard-guicey extensions

Programming Languages

java
68154 projects - #9 most used programming language
groovy
2714 projects

Projects that are alternatives of or similar to dropwizard-guicey-ext

Dropwizard
A damn simple library for building production-ready RESTful web services.
Stars: ✭ 8,078 (+73336.36%)
Mutual labels:  jdbi, dropwizard
Guice-configuration
Guice configuration module allows inject values from files as JSON, HOCON and Properties format
Stars: ✭ 28 (+154.55%)
Mutual labels:  guice
guice-ext-annotations
Guice annotations extensions
Stars: ✭ 22 (+100%)
Mutual labels:  guice
EventBus
A .NET Core ultra lightweight in-memory event bus implementation.
Stars: ✭ 73 (+563.64%)
Mutual labels:  eventbus
mpeventbus
Android event bus for multiple processes. Send and receive events within or between Android processes.
Stars: ✭ 14 (+27.27%)
Mutual labels:  eventbus
MVPHulk
Android MVP 快速集成方案 (支持AndroidX)
Stars: ✭ 19 (+72.73%)
Mutual labels:  eventbus
Farseer.Net
Provides consistent standard use of common components of the .Net Core language
Stars: ✭ 42 (+281.82%)
Mutual labels:  eventbus
giulius-selenium-tests
A test harness that allows Selenium tests to be run using JUnit and test fixtures to be created and injected by a WebDriver-aware Guice
Stars: ✭ 12 (+9.09%)
Mutual labels:  guice
dropwizard-swagger
a Dropwizard bundle that serves Swagger UI static content and loads Swagger endpoints.
Stars: ✭ 176 (+1500%)
Mutual labels:  dropwizard
MVPSamples
🚀(Java 版)快速搭建 MVP + RxJava + Retrofit + EventBus 的框架,方便快速开发新项目、减少开发成本。
Stars: ✭ 113 (+927.27%)
Mutual labels:  eventbus
LocalTransactionTableTest
利用rabbitmq做消息队列,通过本地消息事务表序列化消息,通过定时轮训保证消息强行落地,最终达到数据最终一致性
Stars: ✭ 19 (+72.73%)
Mutual labels:  eventbus
hub
📨 A fast Message/Event Hub using publish/subscribe pattern with support for topics like* rabbitMQ exchanges for Go applications
Stars: ✭ 125 (+1036.36%)
Mutual labels:  eventbus
event bus postgres
🐘 Postgres event store for event_bus
Stars: ✭ 49 (+345.45%)
Mutual labels:  eventbus
herald
Log annotation for logging frameworks
Stars: ✭ 71 (+545.45%)
Mutual labels:  guice
metrics-aspectj
AspectJ integration for Dropwizard Metrics
Stars: ✭ 78 (+609.09%)
Mutual labels:  dropwizard
Retrofit-with-EventBus
Retrofit With EventBus
Stars: ✭ 21 (+90.91%)
Mutual labels:  eventbus
dropwizard-elasticsearch
A set of classes for using Elasticsearch in a Dropwizard service.
Stars: ✭ 61 (+454.55%)
Mutual labels:  dropwizard
keycloak-dropwizard-integration
This project shows how JBoss Keycloak and Dropwizard can be used together.
Stars: ✭ 49 (+345.45%)
Mutual labels:  dropwizard
pg-pubsub
Reliable PostgreSQL LISTEN/NOTIFY with inter-process lock support
Stars: ✭ 50 (+354.55%)
Mutual labels:  eventbus
sbt-guardrail
Principled code generation from OpenAPI specifications
Stars: ✭ 24 (+118.18%)
Mutual labels:  dropwizard

Dropwizard-guicey extensions

License CI Appveyor build status codecov

About

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:

Setup

Maven Central

You can either use modules directly (in this case see module page for setup) or use provided BOM to unify versions management.

BOM

Provides:

  • Guicey bom
  • Guice bom
  • Dropwizard bom

Maven:

<!-- Implicitly imports Dropwizard and Guice BOMs -->
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>ru.vyarus.guicey</groupId>
            <artifactId>guicey-bom</artifactId>
            <version>5.6.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.0</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.6.1-1')
    // uncomment to override dropwizard and its dependencies versions    
    //implementation platform('io.dropwizard:dropwizard-dependencies:2.1.0')
    
    // declare guice and ext modules without versions 
    implementation 'ru.vyarus:dropwizard-guicey'
    implementation 'io.dropwizard:dropwizard-auth'
    implementation 'ru.vyarus.guicey:guicey-eventbus' 
}
    
Dependencies override

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:dropwizard-dependencies:$VERSION for dropwizard
  • com.google.inject:guice-bom:$VERSION for guice

Snapshots

Snapshots may be used through JitPack

WARNING: snapshot may not contain today's commits due to ~1day publication lag!

WARNING2: master-SHAPSHOT versions are not working due to incorrect pom generation (yet unkown reason), use exact commits instead

Add JitPack repository:

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

For spring dependencies plugin:

dependencyManagement {
    resolutionStrategy {
        cacheChangingModulesFor 0, 'seconds'
    }
    imports {
        mavenBom "ru.vyarus.guicey:guicey-bom:COMMIT-HASH"
    }
}   

dependencies {
    implementation 'ru.vyarus.guicey:guicey-validation'
}

If you don't use BOM:

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

dependencies {
    implementation 'ru.vyarus.guicey:guicey-validation:COMMIT-HASH'
}

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.guicey:guicey-bom:8585300d12

Maven:

<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>

Or simply change dependency version if BOM not used (repository definition is still required).

Modules

Admin REST

Admin context rest support (mirror main rest).

Lifecycle annotations

Support for @PostConstruct, @PreDestroy, @PostStartup annotations on guice beans.

Validation

Allows using validation annotations on any guice bean method (the same way as dropwizard rest validation)

Guava EventBus integration

Module provides integration with Guava EventBus: automates subscriptions, report events with subscriptions and registers EventBus for inject.

JDBI integration

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

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.

Single page applications

Correct redirect to index page for html5 client routing urls (e.g. html5 routing enabled by default in Angular 2).

Guicey Server Pages

JSP like simplicity for dropwizard-views.

JUnit 4

JUnit 4 rules.

Spock 1

Spock 1 extensions.


java lib generator

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].