JDBI Guice

Binds JDBI resources into the Guice dependency injection framework.

Лицензия

Лицензия

MIT License
Категории

Категории

GUI Взаимодействие с пользователем JDBI Данные Базы данных Guice Библиотеки уровня приложения Dependency Injection
Группа

Группа

com.github.mlk
Идентификатор

Идентификатор

jdbi-guice
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

JDBI Guice
Binds JDBI resources into the Guice dependency injection framework.
Ссылка на сайт

Ссылка на сайт

https://github.com/mlk/jdbi-guice
Система контроля версий

Система контроля версий

http://github.com/mlk/jdbi-guice

Скачать jdbi-guice

Как подключить последнюю версию

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

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
com.github.mlk : magical-provider-guice jar 1.0.1
org.jdbi : jdbi jar 2.72

test (3)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.mockito : mockito-all jar 1.9.5
com.h2database : h2 jar 1.4.191

Модули Проекта

Данный проект не имеет модулей.

Build Status codecov.io

jdbi-guice

A module to marry together JDBI bound resources to the Guice dependency injection framework.

Injector injector = Guice.createInjector(JdbiModule.builder().scan("com.github.mlk.guice.dao").build(),
                new AbstractModule() {
                    @Override
                    protected void configure() {
                        bind(DBI.class).toInstance(new DBI("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1"));
                    }
                });
        MyDAO myDAO = injector.getInstance(MyDAO.class);

        myDAO.createSomethingTable();
        myDAO.insert(1, "fred");
        System.out.println(myDAO.findNameById(1));

It is on Maven, so use it with:

<dependency>
  <groupId>com.github.mlk</groupId>
  <artifactId>jdbi-guice</artifactId>
  <version>1.0.0</version>
</dependency>

Версии библиотеки

Версия
1.0.0