I have a dropwizard-guicey application with two databases and I wish I could use two JDBI and repositories like so
@Override
public void initialize(final Bootstrap<Configuration> bootstrap) {
bootstrap.addBundle(
GuiceBundle.builder()
.enableAutoConfig(getClass().getPackage().getName())
.bundles(
JdbiBundle.<Configuration>forDatabase(
(conf, env) -> conf.getApplicationDataSourceFactory())
.withPlugins(new H2DatabasePlugin()))
.bundles(
JdbiBundle.<Configuration>forDatabase(
(conf, env) -> conf.getSessionDataSourceFactory())
.withPlugins(new H2DatabasePlugin()))
.build());
...
Would I need to change these lines?
|
public boolean matches(final Class<?> type) { |