List of usage examples for org.springframework.beans.factory.config PropertyPlaceholderConfigurer setPropertiesPersister
public void setPropertiesPersister(@Nullable PropertiesPersister propertiesPersister)
From source file:org.alfresco.cacheserver.dropwizard.Application.java
/** * Creates a Spring property place holder configurer for use in a Spring context * from the given file path.// w w w . j a v a2s . co m * * @param springPropsFileName * @return the Spring property place holder configurer * @throws IOException */ protected PropertyPlaceholderConfigurer loadSpringConfigurer(String yamlConfigFileLocation) throws IOException { if (StringUtils.isEmpty(yamlConfigFileLocation)) { throw new IllegalArgumentException("Config file location must not be empty"); } logger.debug("Loading properties from '" + yamlConfigFileLocation + "'"); PropertyPlaceholderConfigurer configurer = new PropertyPlaceholderConfigurer(); configurer.setLocation(new FileSystemResource(yamlConfigFileLocation)); configurer.setPropertiesPersister(new YamlPropertiesPersister()); return configurer; }