Class AbstractJdbiDefinitionModule

java.lang.Object
com.google.inject.PrivateModule
org.jdbi.v3.guice.AbstractJdbiDefinitionModule
All Implemented Interfaces:
Module, JdbiBinder

public abstract class AbstractJdbiDefinitionModule extends PrivateModule implements JdbiBinder
Base module class to define Jdbi instances. This is a PrivateModule which will by default only expose the constructed Jdbi object as a binding. Everything configured within this module is private to the module and not exposed. This allows installation of multiple instances of modules that extend the AbstractJdbiDefinitionModule base class.

Each module requires a DataSource bound using the same annotation or annotation class as used on the module constructor. If this data source is not present, the injection process will fail.

Successful binding will expose a Jdbi binding annotated with the same annotation or annotation class as used on the module constructor. Additional elements defined in this module can be exposed using the exposeBinding(Class) is called within the configureJdbi() method.