Getting Started JDBI3

Maven Central JavaDoc

Setting up the environment

Add the Dependency to your build.

for Maven:

Java 8, 9, 10 , 11 no module-info

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

Java 6, 7

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

Java 9, 10 , 11 with module-info

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

From 7.0.0 you will need explicitly include the jdbi dependency in your pom.

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.