How to use java.util.Optional with Dropwizard and JDBI
by Eirik Tenold
In order to use Java 8’s java.util.Optional together with Dropwizard and JDBI, first include the Java 8 build of JDBI module:
In pom.xml (use version corresponding with Dropwizard):
In the main application, make sure that you import the correct DBIFactory from the module:
import io.dropwizard.java8.jdbi.DBIFactory;
tags: Dropwizard - JDBI - Java 8