public static Properties readProperties(Resource propertiesFile) {
PropertiesPersister propertiesPersister = new DefaultPropertiesPersister();
Properties properties = new Properties();
try {
propertiesPersister.load(properties, propertiesFile.getInputStream());
} catch (IOException e) {
throw new RuntimeException(e);
}
return properties;
}