List of usage examples for org.springframework.context.support PropertySourcesPlaceholderConfigurer setIgnoreResourceNotFound
public void setIgnoreResourceNotFound(boolean ignoreResourceNotFound)
From source file:ru.elcor.mis.scheduler.config.AppConfig.java
@Bean public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { PropertySourcesPlaceholderConfigurer properties = new PropertySourcesPlaceholderConfigurer(); Properties Props = new Properties(); Props.setProperty("cron", "0-59/2 * * * * *"); properties.setProperties(Props);//w w w . j ava 2 s .com properties.setLocation(new ClassPathResource("scheduler.properties")); properties.setIgnoreResourceNotFound(false); return properties; }
From source file:org.openhims.oauth2.configuration.PropertiesConfiguration.java
public PropertySourcesPlaceholderConfigurer getProperties() { PropertySourcesPlaceholderConfigurer pspc = new PropertySourcesPlaceholderConfigurer(); Resource[] resources = new Resource[] { new ClassPathResource("properties/application.properties"), new ClassPathResource("properties/server.properties") }; pspc.setLocations(resources);/* www . j a v a2 s .c o m*/ pspc.setIgnoreUnresolvablePlaceholders(IGNORE_UNRESOLVABLE_PLACEHOLDERS); pspc.setIgnoreResourceNotFound(true); return pspc; }