public class ExtendedPropertyPlaceholderConfigurer
extends org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
PropertyPlaceholderConfigurer
. Provides runtime
additions of properties and wildcard location lookups.
Properties can be added at runtime by using the static
addGlobalProperty(java.lang.String, java.lang.String)
before* the bean definition is instantiated in the
ApplicationContext. A property added by addGlobalProperty(java.lang.String, java.lang.String)
will get
merged into properties specified by the bean definition, overriding keys that
overlap.
wildcard locations can be used instead of locations, if both are declared the
last will override. Wildcard locations are handled by
setWildcardLocations(String[])
, using
PathMatchingResourcePatternResolver
for matching locations. For
wildcard locations that matches multiple Properties files, they are merged in
by alphabetical filename order.Modifier and Type | Class and Description |
---|---|
static class |
ExtendedPropertyPlaceholderConfigurer.ResourceFilenameComparator |
SYSTEM_PROPERTIES_MODE_FALLBACK, SYSTEM_PROPERTIES_MODE_NEVER, SYSTEM_PROPERTIES_MODE_OVERRIDE
DEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, ignoreUnresolvablePlaceholders, nullValue, placeholderPrefix, placeholderSuffix, valueSeparator
Constructor and Description |
---|
ExtendedPropertyPlaceholderConfigurer() |
Modifier and Type | Method and Description |
---|---|
static void |
addGlobalProperty(String key,
String val)
Add a global property to be merged
|
Properties |
getMergedProperties()
|
protected void |
processProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactoryToProcess,
Properties props) |
void |
setWildcardLocations(String[] locations)
String[] of wildcard locations of properties that are converted to
Resource[] using using
PathMatchingResourcePatternResolver |
parseStringValue, resolvePlaceholder, resolvePlaceholder, resolveSystemProperty, setSearchSystemEnvironment, setSystemPropertiesMode, setSystemPropertiesModeName
doProcessProperties, setBeanFactory, setBeanName, setIgnoreUnresolvablePlaceholders, setNullValue, setPlaceholderPrefix, setPlaceholderSuffix, setValueSeparator
convertProperties, convertProperty, convertPropertyValue, getOrder, postProcessBeanFactory, setOrder
public ExtendedPropertyPlaceholderConfigurer()
protected void processProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactoryToProcess, Properties props) throws org.springframework.beans.BeansException
processProperties
in class org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
org.springframework.beans.BeansException
public Properties getMergedProperties()
Properties
created by processProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory, java.util.Properties)
Properties
public void setWildcardLocations(String[] locations) throws IOException
PathMatchingResourcePatternResolver
locations
- String[]IOException
Copyright © 2006-2012 The Red5 Project