|
|
|
@@ -4,6 +4,7 @@ import org.yaml.snakeyaml.DumperOptions; |
|
|
|
//import org.yaml.snakeyaml.Yaml; |
|
|
|
|
|
|
|
import java.io.*; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
@@ -71,8 +72,9 @@ public class YamlUtils { |
|
|
|
public static Map<String, Object> loadYamlFile(String filePath) { |
|
|
|
Yaml yaml = new Yaml(); |
|
|
|
try (InputStream inputStream = new FileInputStream(new File(filePath))) { |
|
|
|
Map<String, Object> load = (Map<String, Object>) yaml.load(inputStream); |
|
|
|
return load; |
|
|
|
Object load1 = yaml.load(inputStream); |
|
|
|
// Map<String, Object> load = (Map<String, Object>) yaml.load(inputStream); |
|
|
|
return new HashMap<String, Object>(); |
|
|
|
} catch (IOException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
return null; |
|
|
|
|