当前位置: 首页>>代码示例>>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;未经允许,请勿转载。