List of usage examples for org.springframework.context.support PropertySourcesPlaceholderConfigurer setLocations
public void setLocations(Resource... locations)
From source file:net.lalotech.spring.mvc.config.PropertiesConfiguration.java
static @Bean public PropertySourcesPlaceholderConfigurer myPropertySourcesPlaceholderConfigurer() { PropertySourcesPlaceholderConfigurer p = new PropertySourcesPlaceholderConfigurer(); Resource[] resourceLocations = new Resource[] { new ClassPathResource("app.properties") }; p.setLocations(resourceLocations); return p;/*from w ww. j av a 2s .c om*/ }
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; }
From source file:occi.config.SpringOcciConfig.java
@Bean public static PropertySourcesPlaceholderConfigurer properties() { PropertySourcesPlaceholderConfigurer pspc = new PropertySourcesPlaceholderConfigurer(); Resource[] resources = new ClassPathResource[] { new ClassPathResource("OCCI.properties") }; pspc.setLocations(resources); pspc.setIgnoreUnresolvablePlaceholders(true); return pspc;//w ww. java 2s .com }
From source file:org.aksw.gerbil.web.config.RootConfig.java
static @Bean public PropertySourcesPlaceholderConfigurer myPropertySourcesPlaceholderConfigurer() { PropertySourcesPlaceholderConfigurer p = new PropertySourcesPlaceholderConfigurer(); Resource[] resourceLocations = new Resource[] { new ClassPathResource("gerbil.properties"), }; p.setLocations(resourceLocations); return p;//from w w w . j a v a2 s. c om }
From source file:ca.n4dev.dev.worktime.config.ApplicationConfig.java
@Bean public static PropertySourcesPlaceholderConfigurer properties() { PropertySourcesPlaceholderConfigurer propertySources = new PropertySourcesPlaceholderConfigurer(); Resource[] resources = new ClassPathResource[] { new ClassPathResource("worktime.properties") }; propertySources.setLocations(resources); propertySources.setIgnoreUnresolvablePlaceholders(true); return propertySources; }
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:org.geosdi.geoplatform.experimental.connector.core.spring.placeholder.OAuth2CorePlaceholderConfig.java
@Bean public static PropertySourcesPlaceholderConfigurer oauth2CorePropertyConfigurer( @Value("#{systemProperties['GP_DATA_DIR']}") String gpConfigDataDir, @Value("#{systemProperties['OAUTH2_CORE_FILE_PROP']}") String oauth2CoreFileProp) throws MalformedURLException { PropertySourcesPlaceholderConfigurer corePC = new PropertySourcesPlaceholderConfigurer(); corePC.setPlaceholderPrefix("oauth2CoreConfigurator{"); corePC.setPlaceholderSuffix("}"); corePC.setNullValue("@null"); corePC.setLocations(placeholderResourcesLoader.loadResources(gpConfigDataDir, oauth2CoreFileProp)); corePC.setIgnoreResourceNotFound(Boolean.TRUE); corePC.setIgnoreUnresolvablePlaceholders(Boolean.TRUE); return corePC; }
From source file:it.cnr.missioni.connector.core.spring.placeholder.MissioniCorePlaceholderConfig.java
@Bean public static PropertySourcesPlaceholderConfigurer oauth2CorePropertyConfigurer( @Value("#{systemProperties['GP_DATA_DIR']}") String gpConfigDataDir, @Value("#{systemProperties['MISSIONI_CORE_FILE_PROP']}") String missioniCoreFileProp) throws MalformedURLException { PropertySourcesPlaceholderConfigurer corePC = new PropertySourcesPlaceholderConfigurer(); corePC.setPlaceholderPrefix("missioniCoreConfigurator{"); corePC.setPlaceholderSuffix("}"); corePC.setNullValue("@null"); corePC.setLocations(placeholderResourcesLoader.loadResources(gpConfigDataDir, missioniCoreFileProp)); corePC.setIgnoreResourceNotFound(Boolean.TRUE); corePC.setIgnoreUnresolvablePlaceholders(Boolean.TRUE); return corePC; }
From source file:org.kew.rmf.reconciliation.config.MvcConfig.java
static @Bean public PropertySourcesPlaceholderConfigurer myPropertySourcesPlaceholderConfigurer() { PropertySourcesPlaceholderConfigurer p = new PropertySourcesPlaceholderConfigurer(); Resource[] resourceLocations = new Resource[] { new ClassPathResource("/META-INF/spring/reconciliation-service.properties") }; p.setLocations(resourceLocations); return p;//from ww w .j a va 2s . c o m }
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); pspc.setIgnoreUnresolvablePlaceholders(true); pspc.setLocalOverride(true);//from www. j a va 2 s . c om return pspc; }