private static Injector bootstrapApplication(
            final Config configuration,
            final Supplier<BootStrapModule> bootStrapModuleSupplier) {

        Objects.requireNonNull(configuration);
        Objects.requireNonNull(bootStrapModuleSupplier);

        // Create a minimalist injector with just the BuildInfo so we can determine
        // what version the system is at and what we need to do before creating
        // the bootstrap injector
        final BuildInfo buildInfo = BuildInfoProvider.getBuildInfo();
        showBuildInfo(buildInfo);

        // In dev the build ver will always be SNAPSHOT so append the now time to make
        // it different to force the migrations to always run in dev.
        String buildVersion = Objects.requireNonNullElse(buildInfo.getBuildVersion(), SNAPSHOT_VERSION);
        // Comment out this statement if you want dev to behave like prod and respect the version value
        // but you will need to clear the build version in the db to make a mig happen
        buildVersion = SNAPSHOT_VERSION.equals(buildVersion)
                ? SNAPSHOT_VERSION + "_" + DateUtil.createNormalDateTimeString()
                : buildVersion;

        LOGGER.debug("buildVersion: '{}'", buildVersion);

        LOGGER.debug(() -> LogUtil.message("node: {}", NullSafe.getOrElse(
                configuration,
                Config::getYamlAppConfig,
                AppConfig::getNodeConfig,
                NodeConfig::getNodeName,
                "UNKNOWN NODE")));

        return BootstrapUtil.doWithBootstrapLock(
                configuration,
                buildVersion, () -> {
                    LOGGER.info("Initialising database connections and configuration properties");

                    final BootStrapModule bootstrapModule = bootStrapModuleSupplier.get();

                    // This will trigger the migrations to happen as part of the guice
                    // binding initialisation
                    final Injector injector = Guice.createInjector(bootstrapModule);

                    final Set<DataSource> dataSources = injector.getInstance(
                            Key.get(GuiceUtil.setOf(DataSource.class)));

                    LOGGER.debug(() -> LogUtil.message("Used {} data sources:\n{}",
                            dataSources.size(),
                            dataSources.stream()
                                    .map(dataSource -> {
                                        final String prefix = dataSource instanceof DataSourceProxy
                                                ? ((DataSourceProxy) dataSource).getName() + " - "
                                                : "";
                                        return prefix + dataSource.getClass().getName();
                                    })
                                    .map(name -> "  " + name)
                                    .sorted()
                                    .collect(Collectors.joining("\n"))));

                    return injector;
                });
    }
Creates an injector with the bare minimum to initialise the DB connections and configuration.
The initialisation of the DB datasources will trigger the FlyWay DB migration to run.
You should call {@link Injector#createChildInjector} to build a fully formed injector from it.
stroom-app/src/main/java/stroom/app/BootstrapUtil.java