@Override
    protected final void configure() {

        this.jdbiBinder = InternalJdbiBinder.jdbiBinder(binder());

        try {
            // add the customizers for the global and module scope. Order is important here! As the customizers are executed in the order
            // of adding to the multibinder and Jdbi has a "last one wins" policy, the local customizer must be added *after* the global
            // customizer
            Multibinder<GuiceJdbiCustomizer> customizers = Multibinder.newSetBinder(binder(), GuiceJdbiCustomizer.class, JdbiInternal.class);

            if (globalAnnotationClass != null) {
                // binding for optional global settings; this provider returns it if it exists, otherwise just an empty dummy customizer.
                createLooseBinding(customizers.addBinding(), Key.get(GuiceJdbiCustomizer.class, globalAnnotationClass))
                    .withDefault(GuiceJdbiCustomizer.NOP)
                    .in(Scopes.SINGLETON);
            }

            customizers.addBinding().to(InternalGuiceJdbiCustomizer.class).in(Scopes.SINGLETON);

            // bring externally bound data source into the module namespace
            importBinding(DataSource.class).in(Scopes.SINGLETON);

            bind(Jdbi.class).toProvider(InternalGuiceJdbiFactory.class).in(Scopes.SINGLETON);

            // expose locally created Jdbi to the global namespace
            exposeBinding(Jdbi.class);

            configureJdbi();
        } finally {
            this.jdbiBinder = null;
        }
    }
Create a Jdbi definition module with a custom annotation for element configuration.
<p>
A Jdbi definition module that uses this constructor will use the element configuration from {@link AbstractJdbiConfigurationModule}s that use the same
annotation as this constructor.

@param annotationClass       The resulting {@link Jdbi} instance will be exposed using this annotation.
@param globalAnnotationClass Custom annotation class used to look up global settings for this {@link Jdbi} instance.
guice/src/main/java/org/jdbi/v3/guice/AbstractJdbiDefinitionModule.java