public static String getYmlNew(String key){
Resource resource = new ClassPathResource(“application-dev.yml”);
Properties properties = null;
try {
YamlPropertiesFactoryBean yamlFactory = new YamlPropertiesFactoryBean();
yamlFactory.setResources(resource);
properties = yamlFactory.getObject();
} catch (Exception e) {
e.printStackTrace();
return null;
}
return (String) properties.get(key);
}



