本文整理汇总了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());
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}