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));
}
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));
}
有建议,请留言!