Getting Started JDBI3

Maven Central JavaDoc

Setting up the environment

Add the Dependency to your build.

for Maven:

Java 8

<dependency>
    <groupId>org.simpleflatmapper</groupId>
    <artifactId>sfm-jdbi3</artifactId>
    <version>3.14.2</version>
</dependency>

Java 6, 7

<dependency>
    <groupId>org.simpleflatmapper</groupId>
    <artifactId>sfm-jdbi3</artifactId>
    <version>3.14.2</version>
    <classifier>jdk16</classifier>
</dependency>

Java 9/10

<dependency>
    <groupId>org.simpleflatmapper</groupId>
    <artifactId>sfm-jdbi3</artifactId>
    <version>3.14.2</version>
    <classifier>jdk9</classifier>
</dependency>

Init plugin

You can register the SfmJdbiPlugin

Jdbi dbi = Jdbi.create(DbHelper.getHsqlDataSource());
dbi.installPlugins();

or

Jdbi dbi = Jdbi.create(DbHelper.getHsqlDataSource());
dbi.installPlugin(new SfmJdbiPlugin());

to register the Sfm RowMapperFactory.