public static AppConfig readDropWizardSubstitutedAppConfig(final String yamlStr) {

        Objects.requireNonNull(yamlStr);

        final Yaml yaml = new Yaml();
        final Map<String, Object> obj = yaml.load(yamlStr);

        // fail on unknown so it skips over all the drop wiz yaml content that has no
        // corresponding annotated props in DummyConfig
        final ObjectMapper mapper = YamlUtil.getVanillaObjectMapper()
                .copy()
                .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
        try {
            final DummyConfig dummyConfig = mapper.convertValue(obj, DummyConfig.class);
            return dummyConfig.getAppConfig();
        } catch (IllegalArgumentException e) {
            throw new RuntimeException("Error parsing yaml string", e);
        }
    }
Reads a YAML string that has already been through the drop wizard env var substitution.
stroom-config/stroom-config-app/src/main/java/stroom/config/app/StroomYamlUtil.java