Skip to content

Instantly share code, notes, and snippets.

View orangecoding's full-sized avatar
🐵
Live as if you were to die tomorrow. Learn as if you were to live forever.

Christian Kellner orangecoding

🐵
Live as if you were to die tomorrow. Learn as if you were to live forever.
View GitHub Profile
@tzachz
tzachz / H2JDBIRule.java
Last active March 20, 2020 23:01
Dropwizard JDBI JUnit Rule using H2 by default - based on https://gist.github.com/yunspace/9a50e11dbd8661271220
import com.codahale.metrics.MetricRegistry;
import io.dropwizard.db.DataSourceFactory;
import io.dropwizard.jackson.Jackson;
import io.dropwizard.jdbi.DBIFactory;
import io.dropwizard.setup.Environment;
import liquibase.Liquibase;
import liquibase.database.jvm.JdbcConnection;
import liquibase.exception.LiquibaseException;
import liquibase.resource.ClassLoaderResourceAccessor;
import org.junit.rules.ExternalResource;