@Override public void initialize(Bootstrap<JdbiAppConfiguration> bootstrap) { bootstrap.addBundle(GuiceBundle.builder() .enableAutoConfig(JdbiApplication.class.getPackage().getName()) .bundles(JdbiBundle.<JdbiAppConfiguration>forDatabase((conf, env) -> conf.getDatabase())) .build()); // used for manual run to init db bootstrap.addBundle(new FlywayBundle<JdbiAppConfiguration>() { @Override public PooledDataSourceFactory getDataSourceFactory(JdbiAppConfiguration configuration) { return configuration.getDatabase(); } }); }