當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。