當前位置: 首頁>>代碼示例>>Java>>正文


Java PropertyPlaceholderConfigurer.setLocations方法代碼示例

本文整理匯總了Java中org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.setLocations方法的典型用法代碼示例。如果您正苦於以下問題:Java PropertyPlaceholderConfigurer.setLocations方法的具體用法?Java PropertyPlaceholderConfigurer.setLocations怎麽用?Java PropertyPlaceholderConfigurer.setLocations使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.springframework.beans.factory.config.PropertyPlaceholderConfigurer的用法示例。


在下文中一共展示了PropertyPlaceholderConfigurer.setLocations方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: propertyPlaceholderConfigurer

import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; //導入方法依賴的package包/類
/**
 * Property placeholder configurer.
 *
 * @return the property placeholder configurer
 */
@Bean
public static PropertyPlaceholderConfigurer propertyPlaceholderConfigurer() {
	PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
	final List<Resource> resourceLst = new ArrayList<>();
	resourceLst.add(new ClassPathResource("/hibernateTest.properties"));
	resourceLst.add(new ClassPathResource("/config.properties"));
	resourceLst.add(new ClassPathResource("/bankRemittance.properties"));
	resourceLst.add(new ClassPathResource("/firebaseMessaging.properties"));
	resourceLst.add(new ClassPathResource("/firebaseWeb.properties"));
	resourceLst.add(new ClassPathResource("/paypal.properties"));
	resourceLst.add(new ClassPathResource("/recaptcha.properties"));
	//initializeFirebase("configFirebase", "/members-firebase-adminsdk.json");
	ppc.setLocations(resourceLst.toArray(new Resource[] {}));
	return ppc;
}
 
開發者ID:pablogrela,項目名稱:members_cuacfm,代碼行數:21,代碼來源:ApplicationConfigTest.java

示例2: conversionService

import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; //導入方法依賴的package包/類
/**
 * Load the properties files used in application contexts here
 *
 * @return the initialized instance of the PropertyPlaceholderConfigurer class
 */
@Bean(name="properties")
@Scope(BeanDefinition.SCOPE_SINGLETON)
public PropertyPlaceholderConfigurer conversionService() {
    PropertyPlaceholderConfigurer configurer = new PropertyPlaceholderConfigurer();
    Resource resource1 = new ClassPathResource("application_file_1.properties");
    Resource resource2 = new ClassPathResource("application_file_2.properties");
    configurer.setLocations(resource1, resource2);
    return configurer;
}
 
開發者ID:jaffa-projects,項目名稱:jaffa-framework,代碼行數:15,代碼來源:PropertyPlaceholderConfig.java

示例3: newApplicationConf

import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; //導入方法依賴的package包/類
public static PropertyPlaceholderConfigurer newApplicationConf(boolean searchSystemEnvironment, String... locations){
	Assert.notEmpty(locations);
	PropertyPlaceholderConfigurer ppc = new JFishPropertyPlaceholder();
	ppc.setIgnoreResourceNotFound(true);
	ppc.setIgnoreUnresolvablePlaceholders(true);
	ppc.setSearchSystemEnvironment(searchSystemEnvironment);
	List<Resource> resources = new ArrayList<Resource>();
	for(String path : locations){
		resources.add(new ClassPathResource(path));
	}
	ppc.setLocations(resources.toArray(new Resource[resources.size()]));
	return ppc;
}
 
開發者ID:wayshall,項目名稱:onetwo,代碼行數:14,代碼來源:SpringUtils.java

示例4: propertyConfigurer

import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; //導入方法依賴的package包/類
@Bean
public PropertyPlaceholderConfigurer propertyConfigurer()
		throws IOException {
	
	PropertyPlaceholderConfigurer props = new PropertyPlaceholderConfigurer();
	props.setLocations(new Resource[] { new ClassPathResource(
			"akka/application.remote.conf") });
	return props;
}
 
開發者ID:fuse-mars,項目名稱:spring-akka-command,代碼行數:10,代碼來源:Application.java

示例5: properties

import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; //導入方法依賴的package包/類
@Bean 
//Reading of properties filea - ClassPath resources - for some JVM installations works in one place only (..)
public static PropertyPlaceholderConfigurer properties() {
    
	LOGGER.info("PropertyPlaceholderConfigurer configuring ClassPathResource -list of *.properties files");
    PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
    ClassPathResource[] resources = new ClassPathResource[ ] {
        new ClassPathResource("persistence.properties")
    };
    ppc.setLocations( resources );
    ppc.setIgnoreUnresolvablePlaceholders( true );
    LOGGER.info("PropertyPlaceholderConfigurer configuring ClassPathResource -number of files="+resources.length);
    return ppc;
}
 
開發者ID:MUNDO-platform,項目名稱:srccode,代碼行數:15,代碼來源:PersistenceConfig.java

示例6: propertyPlaceholderConfigurer

import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; //導入方法依賴的package包/類
@Bean
public static PropertyPlaceholderConfigurer propertyPlaceholderConfigurer() {
    PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
    ppc.setLocations(new Resource[]{
            new ClassPathResource("/app.properties")
    });
    return ppc;
}
 
開發者ID:vardis,項目名稱:angularJavaAuthToken,代碼行數:9,代碼來源:ApplicationConfig.java

示例7: propertyPlaceholderConfigurer

import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; //導入方法依賴的package包/類
@Bean
public static PropertyPlaceholderConfigurer propertyPlaceholderConfigurer() {
    PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
    ppc.setLocations(new Resource[]{
            new ClassPathResource("/app.test.properties")
    });
    return ppc;
}
 
開發者ID:vardis,項目名稱:angularJavaAuthToken,代碼行數:9,代碼來源:ApplicationTestConfig.java

示例8: propertyConfigurer

import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; //導入方法依賴的package包/類
@Bean
public static PropertyPlaceholderConfigurer propertyConfigurer() throws IOException {
	PropertyPlaceholderConfigurer props = new PropertyPlaceholderConfigurer();
	props.setLocations(new Resource[] { new ClassPathResource("db.properties") });
	return props;
}
 
開發者ID:jirkapinkas,項目名稱:sitemonitoring-production,代碼行數:7,代碼來源:SpringCustomConfiguration.java

示例9: propertyConfigurer

import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; //導入方法依賴的package包/類
@Bean
public static PropertyPlaceholderConfigurer propertyConfigurer() throws IOException {
    PropertyPlaceholderConfigurer props = new PropertyPlaceholderConfigurer();
    props.setLocations(new Resource[] {new ClassPathResource("application.properties")});
    return props;
}
 
開發者ID:Godless,項目名稱:webapps-runner,代碼行數:7,代碼來源:XDRConfigurationHolder.java


注:本文中的org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.setLocations方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。