yaml
format_version: "1.1"
services:
- name: my-service
url: http://localhost:8080
routes:
- name: my-route
paths:
- /api
import org.yaml.snakeyaml.Yaml;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.Map;
public class Application {
public static void main(String[] args) {
try {
FileInputStream file = new FileInputStream("kong.yml");
Yaml yaml = new Yaml();
Map<String, Object> config = yaml.load(file);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
}