org.http4k.config.extensions.kt Maven / Gradle / Ivy
package org.http4k.config
import org.http4k.format.JacksonYaml
import java.io.File
import java.io.FileNotFoundException
import java.io.InputStreamReader
import java.util.Properties
/**
* Read a YAML file into environments, prepending all of the nested levels into the property names
*/
fun Environment.Companion.fromYaml(file: File): Environment {
val map = JacksonYaml.asA