List of usage examples for org.springframework.context.support PropertySourcesPlaceholderConfigurer setIgnoreUnresolvablePlaceholders
public void setIgnoreUnresolvablePlaceholders(boolean ignoreUnresolvablePlaceholders)
From source file:org.ng200.openolympus.MvcConfig.java
@Bean public static PropertySourcesPlaceholderConfigurer properties() { final PropertySourcesPlaceholderConfigurer propertySources = new PropertySourcesPlaceholderConfigurer(); final Resource[] resources = new ClassPathResource[] { new ClassPathResource("spring.properties") }; propertySources.setLocations(resources); propertySources.setIgnoreUnresolvablePlaceholders(true); return propertySources; }
From source file:dk.nsi.haiba.minipasconverter.config.MinipasConverterConfiguration.java
@Bean public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer(); propertySourcesPlaceholderConfigurer.setIgnoreResourceNotFound(true); propertySourcesPlaceholderConfigurer.setIgnoreUnresolvablePlaceholders(false); propertySourcesPlaceholderConfigurer .setLocations(new Resource[] { new ClassPathResource("default-config.properties"), new ClassPathResource("minipasconfig.properties") }); return propertySourcesPlaceholderConfigurer; }
From source file:fr.treeptik.cloudunit.initializer.CloudUnitApplicationContext.java
@Bean @Profile("vagrant") public static PropertySourcesPlaceholderConfigurer properties() throws Exception { PropertySourcesPlaceholderConfigurer pspc = new PropertySourcesPlaceholderConfigurer(); Resource[] resources = new Resource[] { new ClassPathResource("application-vagrant.properties") }; pspc.setLocations(resources);//from ww w . j a v a 2 s .c o m pspc.setIgnoreUnresolvablePlaceholders(true); pspc.setLocalOverride(true); return pspc; }
From source file:fr.treeptik.cloudunit.initializer.CloudUnitApplicationContext.java
@Bean @Profile("integration") public static PropertySourcesPlaceholderConfigurer propertiesForIntegration() throws Exception { PropertySourcesPlaceholderConfigurer pspc = new PropertySourcesPlaceholderConfigurer(); Resource[] resources = new Resource[] { new ClassPathResource("application-integration.properties") }; pspc.setLocations(resources);/*from ww w. j av a 2 s. c o m*/ pspc.setIgnoreUnresolvablePlaceholders(true); pspc.setLocalOverride(true); return pspc; }
From source file:dk.nsi.haiba.epimibaimporter.config.EPIMIBAConfiguration.java
@Bean public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer(); propertySourcesPlaceholderConfigurer.setIgnoreResourceNotFound(true); propertySourcesPlaceholderConfigurer.setIgnoreUnresolvablePlaceholders(false); propertySourcesPlaceholderConfigurer .setLocations(new Resource[] { new ClassPathResource("default-config.properties"), new ClassPathResource("epimibaconfig.properties") }); return propertySourcesPlaceholderConfigurer; }
From source file:cn.org.once.cstack.initializer.CloudUnitApplicationContext.java
@Bean @Profile("vagrant") public static PropertySourcesPlaceholderConfigurer properties() throws Exception { String file = "application-vagrant.properties"; PropertySourcesPlaceholderConfigurer pspc = new PropertySourcesPlaceholderConfigurer(); pspc.setLocations(getResources(file)); pspc.setIgnoreUnresolvablePlaceholders(true); pspc.setLocalOverride(true);/*w ww .java 2s .com*/ return pspc; }
From source file:cn.org.once.cstack.initializer.CloudUnitApplicationContext.java
@Bean @Profile("production") public static PropertySourcesPlaceholderConfigurer propertiesForProduction() throws Exception { String file = "application-production.properties"; PropertySourcesPlaceholderConfigurer pspc = new PropertySourcesPlaceholderConfigurer(); pspc.setLocations(getResources(file)); pspc.setIgnoreUnresolvablePlaceholders(true); pspc.setLocalOverride(true);//from www . jav a 2 s.c o m return pspc; }
From source file:cn.org.once.cstack.initializer.CloudUnitApplicationContext.java
@Bean @Profile("vagrant-demo") public static PropertySourcesPlaceholderConfigurer propertiesForDemo() throws Exception { String file = "application-vagrant-demo.properties"; PropertySourcesPlaceholderConfigurer pspc = new PropertySourcesPlaceholderConfigurer(); pspc.setLocations(getResources(file)); pspc.setIgnoreUnresolvablePlaceholders(true); pspc.setLocalOverride(true);//from www . j a v a 2 s . c o m return pspc; }
From source file:cn.org.once.cstack.initializer.CloudUnitApplicationContext.java
@Bean @Profile("integration") public static PropertySourcesPlaceholderConfigurer propertiesForIntegration() throws Exception { String file = "application-integration-local.properties"; String envIntegration = System.getenv("CLOUDUNIT_JENKINS_CI"); if ("true".equalsIgnoreCase(envIntegration)) { file = "application-integration.properties"; }//from www .j a v a 2s . c om PropertySourcesPlaceholderConfigurer pspc = new PropertySourcesPlaceholderConfigurer(); pspc.setLocations(getResources(file)); pspc.setIgnoreUnresolvablePlaceholders(true); pspc.setLocalOverride(true); return pspc; }
From source file:de.thm.arsnova.config.ExtraConfig.java
@Bean public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { final PropertySourcesPlaceholderConfigurer configurer = new PropertySourcesPlaceholderConfigurer(); configurer.setLocations(new Resource[] { new ClassPathResource("arsnova.properties.example"), new FileSystemResource("/etc/arsnova/arsnova.properties"), }); configurer.setIgnoreResourceNotFound(true); configurer.setIgnoreUnresolvablePlaceholders(false); return configurer; }