public static Config readConfig(final Path configFile) throws IOException {

        final ConfigurationSourceProvider configurationSourceProvider = createConfigurationSourceProvider(
                new FileConfigurationSourceProvider(), false);

        final ConfigurationFactory<Config> configurationFactory = configFactorySupplier.getValueWithLocks();

        Config config = null;
        try {
            config = configurationFactory.build(configurationSourceProvider, configFile.toAbsolutePath().toString());
        } catch (ConfigurationException e) {
            throw new RuntimeException(LogUtil.message("Error parsing configuration from file {}",
                    configFile.toAbsolutePath()), e);
        }

        return config;
    }
Reads a yaml file that matches the structure of a complete DropWizard {@link Config}
object tree. The file undergoes substitution and validation.
stroom-config/stroom-config-app/src/main/java/stroom/config/app/StroomYamlUtil.java