当前位置: 首页>>代码示例>>Java>>正文


Java PropertyPlaceholderConfigurer.setIgnoreUnresolvablePlaceholders方法代码示例

本文整理汇总了Java中org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.setIgnoreUnresolvablePlaceholders方法的典型用法代码示例。如果您正苦于以下问题:Java PropertyPlaceholderConfigurer.setIgnoreUnresolvablePlaceholders方法的具体用法?Java PropertyPlaceholderConfigurer.setIgnoreUnresolvablePlaceholders怎么用?Java PropertyPlaceholderConfigurer.setIgnoreUnresolvablePlaceholders使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.beans.factory.config.PropertyPlaceholderConfigurer的用法示例。


在下文中一共展示了PropertyPlaceholderConfigurer.setIgnoreUnresolvablePlaceholders方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ChildApplicationContext

import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; //导入方法依赖的package包/类
/**
 * The Constructor.
 * 
 * @param properties
 *            the properties
 * @param compositeProperties
 *            the composite properties
 * @throws BeansException
 *             the beans exception
 */
private ChildApplicationContext(Properties properties,
        Map<String, Map<String, CompositeDataBean>> compositeProperties) throws BeansException
{
    super(getContextResourcePatterns(), false, ChildApplicationContextFactory.this.getParent());

    this.compositeProperties = compositeProperties;

    // Add a property placeholder configurer, with the subsystem-scoped default properties
    PropertyPlaceholderConfigurer configurer = new PropertyPlaceholderConfigurer();
    configurer.setPropertiesArray(new Properties[] {ChildApplicationContextFactory.this.getPropertyDefaults(), properties});
    configurer.setIgnoreUnresolvablePlaceholders(true);
    configurer.setSearchSystemEnvironment(false);
    addBeanFactoryPostProcessor(configurer);

    setClassLoader(ChildApplicationContextFactory.this.getParent().getClassLoader());
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:27,代码来源:ChildApplicationContextFactory.java

示例2: 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

示例3: propertyPlaceholderConfigurer

import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; //导入方法依赖的package包/类
/**
 * Returns a general properties placeholder configurer based on
 * {@link #logSnifferProperties()}.
 * 
 * @param props
 *            autowired logSnifferProperties bean
 * @return A general properties placeholder configurer.
 * @throws IOException
 */
@Bean
@Scope(ConfigurableBeanFactory.SCOPE_SINGLETON)
@Autowired
public static PropertyPlaceholderConfigurer propertyPlaceholderConfigurer(
		@Qualifier(BEAN_LOGSNIFFER_PROPS) final Properties props) throws IOException {
	final PropertyPlaceholderConfigurer c = new PropertyPlaceholderConfigurer();
	c.setIgnoreResourceNotFound(true);
	c.setIgnoreUnresolvablePlaceholders(true);
	c.setSystemPropertiesMode(PropertyPlaceholderConfigurer.SYSTEM_PROPERTIES_MODE_OVERRIDE);
	c.setProperties(props);
	return c;
}
 
开发者ID:logsniffer,项目名称:logsniffer,代码行数:22,代码来源:CoreAppConfig.java

示例4: 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

示例5: getPropertyPlaceholderConfigurer

import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; //导入方法依赖的package包/类
@Bean
public static PropertyPlaceholderConfigurer getPropertyPlaceholderConfigurer()
{
    PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
    ppc.setLocation(new FileSystemResource(System.getProperty("catalina.base") + "/conf/awsi.properties"));
    ppc.setIgnoreUnresolvablePlaceholders(false);
    return ppc;
}
 
开发者ID:david-ciamberlano,项目名称:website-inventor,代码行数:9,代码来源:AppConfiguration.java

示例6: placeHolderProperties

import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; //导入方法依赖的package包/类
@Bean
public PropertyPlaceholderConfigurer placeHolderProperties() throws Exception {

	log.info("create PropertyPlaceholderConfigurer");
	PropertyPlaceholderConfigurer configurer = new PropertyPlaceholderConfigurer();
	configurer.setLocation(new ClassPathResource("batch.properties"));
	configurer.setSystemPropertiesModeName("SYSTEM_PROPERTIES_MODE_OVERRIDE");
	configurer.setIgnoreUnresolvablePlaceholders(true);
	configurer.setOrder(1);

	return configurer;
}
 
开发者ID:debop,项目名称:spring-batch-experiments,代码行数:13,代码来源:LaunchConfiguration.java

示例7: placeHolderProperties

import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; //导入方法依赖的package包/类
@Bean
public PropertyPlaceholderConfigurer placeHolderProperties() throws Exception {

    LaunchConfiguration.log.info("create PropertyPlaceholderConfigurer");
    PropertyPlaceholderConfigurer configurer = new PropertyPlaceholderConfigurer();
    configurer.setLocation(new ClassPathResource("batch.properties"));
    configurer.setSystemPropertiesModeName("SYSTEM_PROPERTIES_MODE_OVERRIDE");
    configurer.setIgnoreUnresolvablePlaceholders(true);
    configurer.setOrder(1);

    return configurer;
}
 
开发者ID:debop,项目名称:spring-batch-experiments,代码行数:13,代码来源:LaunchConfiguration.java


注:本文中的org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.setIgnoreUnresolvablePlaceholders方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。