yml内容如何转map
解决方法:
Map map = null;
Yaml yaml = new Yaml();
File ymlFile = new File("c:/src/test/java/application.yml");
if (ymlFile != null && ymlFile.exists()) {
map = (Map) yaml.load(new FileInputStream(ymlFile));
}
解决方法:
Map map = null;
Yaml yaml = new Yaml();
File ymlFile = new File("c:/src/test/java/application.yml");
if (ymlFile != null && ymlFile.exists()) {
map = (Map) yaml.load(new FileInputStream(ymlFile));
}
转载于:https://www.cnblogs.com/chinaifae/p/10189714.html